HTupleLegacy.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. // This file includes wrapper signatures compatible
  2. // with HTuple in HALCON 10.0 or older
  3. // Special signatures
  4. Hlong Num() const
  5. {
  6. return Length();
  7. }
  8. void Reset()
  9. {
  10. Clear();
  11. }
  12. HTuple Getenv()
  13. {
  14. return TupleEnvironment();
  15. }
  16. HTuple ToString(const HTuple& pattern) const
  17. {
  18. return TupleString(pattern[0].S());
  19. }
  20. HTuple Subset(const HTuple& index) const
  21. {
  22. return TupleSelect(index);
  23. }
  24. // General shortened operator names without Tuple prefix
  25. HTuple Substring(const HTuple& Index1, const HTuple& Index2) const
  26. {
  27. return TupleSubstr(Index1, Index2);
  28. }
  29. HTuple HistoRange(const HTuple& Min, const HTuple& Max, const HTuple& NumBins,
  30. HTuple* BinSize) const
  31. {
  32. return TupleHistoRange(Min, Max, NumBins, BinSize);
  33. }
  34. HTuple RegexpSelect(const HTuple& Expression) const
  35. {
  36. return TupleRegexpSelect(Expression);
  37. }
  38. HTuple RegexpTest(const HTuple& Expression) const
  39. {
  40. return TupleRegexpTest(Expression);
  41. }
  42. HTuple RegexpReplace(const HTuple& Expression, const HTuple& Replace) const
  43. {
  44. return TupleRegexpReplace(Expression, Replace);
  45. }
  46. HTuple RegexpMatch(const HTuple& Expression) const
  47. {
  48. return TupleRegexpMatch(Expression);
  49. }
  50. HTuple Rand()
  51. {
  52. return TupleRand(*this);
  53. }
  54. HTuple Sgn() const
  55. {
  56. return TupleSgn();
  57. }
  58. HTuple Max2(const HTuple& T2) const
  59. {
  60. return TupleMax2(T2);
  61. }
  62. HTuple Min2(const HTuple& T2) const
  63. {
  64. return TupleMin2(T2);
  65. }
  66. HTuple Max() const
  67. {
  68. return TupleMax();
  69. }
  70. HTuple Min() const
  71. {
  72. return TupleMin();
  73. }
  74. HTuple Cumul() const
  75. {
  76. return TupleCumul();
  77. }
  78. HTuple SelectRank(const HTuple& RankIndex) const
  79. {
  80. return TupleSelectRank(RankIndex);
  81. }
  82. HTuple Median() const
  83. {
  84. return TupleMedian();
  85. }
  86. HTuple Sum() const
  87. {
  88. return TupleSum();
  89. }
  90. HTuple Mean() const
  91. {
  92. return TupleMean();
  93. }
  94. HTuple Deviation() const
  95. {
  96. return TupleDeviation();
  97. }
  98. HTuple Uniq() const
  99. {
  100. return TupleUniq();
  101. }
  102. HTuple Find(const HTuple& T2) const
  103. {
  104. return TupleFind(T2);
  105. }
  106. HTuple SortIndex() const
  107. {
  108. return TupleSortIndex();
  109. }
  110. HTuple Sort() const
  111. {
  112. return TupleSort();
  113. }
  114. HTuple Inverse() const
  115. {
  116. return TupleInverse();
  117. }
  118. HTuple Concat(const HTuple& T2) const
  119. {
  120. return TupleConcat(T2);
  121. }
  122. HTuple SelectRange(const HTuple& Leftindex, const HTuple& Rightindex) const
  123. {
  124. return TupleSelectRange(Leftindex, Rightindex);
  125. }
  126. HTuple LastN(const HTuple& Index) const
  127. {
  128. return TupleLastN(Index);
  129. }
  130. HTuple FirstN(const HTuple& Index) const
  131. {
  132. return TupleFirstN(Index);
  133. }
  134. HTuple Remove(const HTuple& Index) const
  135. {
  136. return TupleRemove(Index);
  137. }
  138. HTuple Select(const HTuple& Index) const
  139. {
  140. return TupleSelect(Index);
  141. }
  142. HTuple StrBitSelect(const HTuple& Index) const
  143. {
  144. return TupleStrBitSelect(Index);
  145. }
  146. HTuple Environment() const
  147. {
  148. return TupleEnvironment();
  149. }
  150. HTuple Split(const HTuple& T2) const
  151. {
  152. return TupleSplit(T2);
  153. }
  154. HTuple StrLastN(const HTuple& T2) const
  155. {
  156. return TupleStrLastN(T2);
  157. }
  158. HTuple StrFirstN(const HTuple& T2) const
  159. {
  160. return TupleStrFirstN(T2);
  161. }
  162. HTuple Strrchr(const HTuple& T2) const
  163. {
  164. return TupleStrrchr(T2);
  165. }
  166. HTuple Strchr(const HTuple& T2) const
  167. {
  168. return TupleStrchr(T2);
  169. }
  170. HTuple Strrstr(const HTuple& T2) const
  171. {
  172. return TupleStrrstr(T2);
  173. }
  174. HTuple Strstr(const HTuple& T2) const
  175. {
  176. return TupleStrstr(T2);
  177. }
  178. HTuple Strlen() const
  179. {
  180. return TupleStrlen();
  181. }
  182. HTuple LessEqual(const HTuple& T2) const
  183. {
  184. return TupleLessEqual(T2);
  185. }
  186. HTuple Less(const HTuple& T2) const
  187. {
  188. return TupleLess(T2);
  189. }
  190. HTuple GreaterEqual(const HTuple& T2) const
  191. {
  192. return TupleGreaterEqual(T2);
  193. }
  194. HTuple Greater(const HTuple& T2) const
  195. {
  196. return TupleGreater(T2);
  197. }
  198. HTuple NotEqual(const HTuple& T2) const
  199. {
  200. return TupleNotEqual(T2);
  201. }
  202. HTuple Equal(const HTuple& T2) const
  203. {
  204. return TupleEqual(T2);
  205. }
  206. HTuple Not() const
  207. {
  208. return TupleNot();
  209. }
  210. HTuple Xor(const HTuple& T2) const
  211. {
  212. return TupleXor(T2);
  213. }
  214. HTuple Or(const HTuple& T2) const
  215. {
  216. return TupleOr(T2);
  217. }
  218. HTuple And(const HTuple& T2) const
  219. {
  220. return TupleAnd(T2);
  221. }
  222. HTuple Bnot() const
  223. {
  224. return TupleBnot();
  225. }
  226. HTuple Bxor(const HTuple& T2) const
  227. {
  228. return TupleBxor(T2);
  229. }
  230. HTuple Bor(const HTuple& T2) const
  231. {
  232. return TupleBor(T2);
  233. }
  234. HTuple Band(const HTuple& T2) const
  235. {
  236. return TupleBand(T2);
  237. }
  238. HTuple Rsh(const HTuple& Shift) const
  239. {
  240. return TupleRsh(Shift);
  241. }
  242. HTuple Lsh(const HTuple& Shift) const
  243. {
  244. return TupleLsh(Shift);
  245. }
  246. HTuple Chrt() const
  247. {
  248. return TupleChrt();
  249. }
  250. HTuple Ords() const
  251. {
  252. return TupleOrds();
  253. }
  254. HTuple Chr() const
  255. {
  256. return TupleChr();
  257. }
  258. HTuple Ord() const
  259. {
  260. return TupleOrd();
  261. }
  262. HTuple String(const HTuple& Format) const
  263. {
  264. return TupleString(Format);
  265. }
  266. HTuple IsNumber() const
  267. {
  268. return TupleIsNumber();
  269. }
  270. HTuple Number() const
  271. {
  272. return TupleNumber();
  273. }
  274. HTuple Round() const
  275. {
  276. return TupleRound();
  277. }
  278. HTuple Int() const
  279. {
  280. return TupleInt();
  281. }
  282. HTuple Real() const
  283. {
  284. return TupleReal();
  285. }
  286. HTuple Ldexp(const HTuple& T2) const
  287. {
  288. return TupleLdexp(T2);
  289. }
  290. HTuple Fmod(const HTuple& T2) const
  291. {
  292. return TupleFmod(T2);
  293. }
  294. HTuple Mod(const HTuple& T2) const
  295. {
  296. return TupleMod(T2);
  297. }
  298. HTuple Ceil() const
  299. {
  300. return TupleCeil();
  301. }
  302. HTuple Floor() const
  303. {
  304. return TupleFloor();
  305. }
  306. HTuple Pow(const HTuple& T2) const
  307. {
  308. return TuplePow(T2);
  309. }
  310. HTuple Log10() const
  311. {
  312. return TupleLog10();
  313. }
  314. HTuple Log() const
  315. {
  316. return TupleLog();
  317. }
  318. HTuple Exp() const
  319. {
  320. return TupleExp();
  321. }
  322. HTuple Tanh() const
  323. {
  324. return TupleTanh();
  325. }
  326. HTuple Cosh() const
  327. {
  328. return TupleCosh();
  329. }
  330. HTuple Sinh() const
  331. {
  332. return TupleSinh();
  333. }
  334. HTuple Rad() const
  335. {
  336. return TupleRad();
  337. }
  338. HTuple Deg() const
  339. {
  340. return TupleDeg();
  341. }
  342. HTuple Atan2(const HTuple& X) const
  343. {
  344. return TupleAtan2(X);
  345. }
  346. HTuple Atan() const
  347. {
  348. return TupleAtan();
  349. }
  350. HTuple Acos() const
  351. {
  352. return TupleAcos();
  353. }
  354. HTuple Asin() const
  355. {
  356. return TupleAsin();
  357. }
  358. HTuple Tan() const
  359. {
  360. return TupleTan();
  361. }
  362. HTuple Cos() const
  363. {
  364. return TupleCos();
  365. }
  366. HTuple Sin() const
  367. {
  368. return TupleSin();
  369. }
  370. HTuple Fabs() const
  371. {
  372. return TupleFabs();
  373. }
  374. HTuple Sqrt() const
  375. {
  376. return TupleSqrt();
  377. }
  378. HTuple Abs() const
  379. {
  380. return TupleAbs();
  381. }
  382. HTuple Neg() const
  383. {
  384. return TupleNeg();
  385. }
  386. HTuple Div(const HTuple& Q2) const
  387. {
  388. return TupleDiv(Q2);
  389. }
  390. HTuple Mult(const HTuple& P2) const
  391. {
  392. return TupleMult(P2);
  393. }
  394. HTuple Sub(const HTuple& D2) const
  395. {
  396. return TupleSub(D2);
  397. }
  398. HTuple Add(const HTuple& S2) const
  399. {
  400. return TupleAdd(S2);
  401. }
  402. // Legacy operator overloads
  403. HTuple operator()(Hlong min, Hlong max) const
  404. {
  405. return TupleSelectRange(min, max);
  406. }
  407. HTuple operator()(const HTuple& min, const HTuple& max) const
  408. {
  409. return TupleSelectRange(min, max);
  410. }