//轉置乙個陣列
htuple tuple;
tuple = htuple::tuplegensequence(1, 10, 1);//獲得1-10的陣列序列
for (int i = 0; icout
<< (double)tuple[i] << " ";
}cout
<< endl;
htuple result = tuple.tupleinverse();//對陣列序列進行轉置
for (int i = 0; icout
<< (double)result[i] << " ";
}cout
<< endl;
//對指定陣列進行公升序排列
tuple[5] = 14;
tuple[1] = 21;
tuple[9] = 1;
for (int i = 0; icout
<< (double)tuple[i] << " ";
}cout
<< endl;
result = tuple.tuplesort();
for (int i = 0; icout
<< (double)result[i] << " ";
}cout
<< endl;
//對指定陣列進行公升序排列,返回陣列元素下標的變換位置
tuple[5] = 10;
tuple[1] = 24;
tuple[9] = 5;
for (int i = 0; icout
<< (double)tuple[i] << " ";
}cout
<< endl;
result = tuple.tuplesortindex();
for (int i = 0; icout
<< (double)result[i] << " ";
}cout
<< endl;
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 ...