//計算陣列的積累值,tuple陣列中每個元素必須都是數字,輸入[1,2,3,4],則輸出[1,3,6,10],如果輸入的有浮點數,則輸出結果也會出現浮點數
void testtuplecumul()
for (int i = 0; i < 10; i++)
cout
<< endl;
htuple result = tuple.tuplecumul();
for (int i = 0; i < 10; i++)
}//轉化陣列中的值從弧度到角度.
void testtupledeg()
for (int i = 0; i < 10; i++)
cout
<< endl;
htuple result = tuple.tupledeg();
for (int i = 0; i < 10; i++)
}//陣列之間執行相除操作。
void testtuplediv()
htuple tuple2;
for (int i = 0; i < 10; i++)
htuple result = tuple1.tuplediv(tuple2);
for (int i = 0; i < 10; i++)
}//陣列的指數運算,總是返回浮點值,陣列中元素必須是數值型,result=e^x
void testtupleexp()
htuple result = tuple1.tupleexp();
for (int i = 0; i < 10; i++)
}//浮點型的陣列求絕對值
void testtuplefabs()
htuple result = tuple1.tuplefabs();
for (int i = 0; i < 10; i++)
}//通過下限函式計算tuple陣列,比如[2.5]=2,[2.1]=2,[3.5]=3
//注意。(double)result[i] 轉化格式不能錯,一旦出錯,程式會中斷
void testtuplefloor()
for (int i = 0; i < 10; i++)
cout
<< endl;
htuple result = tuple.tuplefloor();
for (int i = 0; i < 10; i++)
}//計算兩個浮點數的相除的餘數
void testtuplefmod()
htuple tuple2;
for (int i = 0; i < 10; i++)
htuple result = tuple1.tuplefmod(tuple2);
for (int i = 0; i < 10; i++)
}// 裝載浮點數,ldexp(double value, int exp); 功 能: 計算value乘以2的exp次冪
void testtupleldexp()
htuple tuple2;
for (int i = 0; i < 10; i++)
htuple result = tuple1.tupleldexp(tuple2);
for (int i = 0; i < 10; i++)
}
halcon學習之tuple比較運算
執行兩個tuple陣列之間的相互比較 void testcomparison htuple tuple1 tuple1 0 1 tuple1 1 1 tuple1 2 2 htuple tuple2 tuple2 0 1 tuple2 1 2 tuple2 2 1 htuple result tup...
halcon學習之tuple轉化操作
對tuple陣列執行相關的轉化操作 通過截斷乙個浮點型的資料,轉化為整形資料,tuple內容不允許是string型別 htuple tuple1 12.124431432 htuple result tuple1.tupleint cout hlong result result tuple2.tu...
halcon學習 tuple之算術運算1
對指定tuple陣列內的值求絕對值 void testtupleabs for int i 0 i 10 i htuple result tuple.tupleabs cout endl for int i 0 i 10 i 計算反余弦 void testtupleacos for int i 0 ...