test_multi_index_utility.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. // Copyright (c) 2018-2019 Cem Bassoy
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See
  4. // accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // The author gratefully acknowledge the support of
  8. // Fraunhofer and Google in producing this work
  9. // which started as a Google Summer of Code project.
  10. //
  11. #include <boost/numeric/ublas/tensor.hpp>
  12. #include <boost/test/unit_test.hpp>
  13. BOOST_AUTO_TEST_SUITE ( test_multi_index_utility )
  14. BOOST_AUTO_TEST_CASE ( test_multi_index_has_index )
  15. {
  16. using namespace boost::numeric::ublas;
  17. using namespace boost::numeric::ublas::index;
  18. {
  19. constexpr auto tuple = std::tuple<>{};
  20. constexpr auto has_a = has_index<decltype(_a),decltype(tuple)>::value;
  21. constexpr auto has_b = has_index<decltype(_b),decltype(tuple)>::value;
  22. BOOST_CHECK( !has_a );
  23. BOOST_CHECK( !has_b );
  24. }
  25. {
  26. constexpr auto tuple = std::make_tuple(_a);
  27. constexpr auto has_a = has_index<decltype(_a),decltype(tuple)>::value;
  28. constexpr auto has_b = has_index<decltype(_b),decltype(tuple)>::value;
  29. BOOST_CHECK( has_a );
  30. BOOST_CHECK( !has_b );
  31. }
  32. {
  33. constexpr auto tuple = std::make_tuple(_a,_b,_,_c,_d);
  34. constexpr auto has_a = has_index<decltype(_a),decltype(tuple)>::value;
  35. constexpr auto has_b = has_index<decltype(_b),decltype(tuple)>::value;
  36. constexpr auto has_c = has_index<decltype(_c),decltype(tuple)>::value;
  37. constexpr auto has_d = has_index<decltype(_d),decltype(tuple)>::value;
  38. constexpr auto has_e = has_index<decltype(_e),decltype(tuple)>::value;
  39. constexpr auto has__ = has_index<decltype( _),decltype(tuple)>::value;
  40. BOOST_CHECK( has_a );
  41. BOOST_CHECK( has_b );
  42. BOOST_CHECK( has_c );
  43. BOOST_CHECK( has_d );
  44. BOOST_CHECK( !has_e );
  45. BOOST_CHECK( has__ );
  46. }
  47. }
  48. BOOST_AUTO_TEST_CASE ( test_multi_index_valid )
  49. {
  50. using namespace boost::numeric::ublas;
  51. using namespace boost::numeric::ublas::index;
  52. {
  53. constexpr auto tuple = std::tuple<>{};
  54. constexpr auto valid = valid_multi_index<decltype(tuple)>::value;
  55. BOOST_CHECK( valid );
  56. }
  57. {
  58. constexpr auto tuple = std::make_tuple(_a);
  59. constexpr auto valid = valid_multi_index<decltype(tuple)>::value;
  60. BOOST_CHECK( valid );
  61. }
  62. {
  63. constexpr auto tuple = std::make_tuple(_a,_,_b);
  64. constexpr auto valid = valid_multi_index<decltype(tuple)>::value;
  65. BOOST_CHECK( valid );
  66. }
  67. {
  68. constexpr auto tuple = std::make_tuple(_a,_,_b,_b);
  69. constexpr auto valid = valid_multi_index<decltype(tuple)>::value;
  70. BOOST_CHECK( !valid );
  71. }
  72. {
  73. constexpr auto tuple = std::make_tuple(_c,_a,_,_b,_b);
  74. constexpr auto valid = valid_multi_index<decltype(tuple)>::value;
  75. BOOST_CHECK( !valid );
  76. }
  77. {
  78. constexpr auto tuple = std::make_tuple(_c,_a,_,_b);
  79. constexpr auto valid = valid_multi_index<decltype(tuple)>::value;
  80. BOOST_CHECK( valid );
  81. }
  82. {
  83. constexpr auto tuple = std::make_tuple(_,_c,_a,_,_b);
  84. constexpr auto valid = valid_multi_index<decltype(tuple)>::value;
  85. BOOST_CHECK( valid );
  86. }
  87. {
  88. constexpr auto tuple = std::make_tuple(_,_c,_a,_,_b,_);
  89. constexpr auto valid = valid_multi_index<decltype(tuple)>::value;
  90. BOOST_CHECK( valid );
  91. }
  92. }
  93. BOOST_AUTO_TEST_CASE ( test_multi_index_number_equal_indices )
  94. {
  95. using namespace boost::numeric::ublas;
  96. using namespace boost::numeric::ublas::index;
  97. {
  98. constexpr auto lhs = std::tuple<>{};
  99. constexpr auto rhs = std::tuple<>{};
  100. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  101. BOOST_CHECK_EQUAL( num, 0 );
  102. }
  103. {
  104. constexpr auto lhs = std::make_tuple(_a);
  105. constexpr auto rhs = std::tuple<>{};
  106. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  107. BOOST_CHECK_EQUAL( num, 0 );
  108. }
  109. {
  110. constexpr auto lhs = std::tuple<>{};
  111. constexpr auto rhs = std::make_tuple(_a);
  112. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  113. BOOST_CHECK_EQUAL( num, 0 );
  114. }
  115. {
  116. constexpr auto lhs = std::make_tuple(_b);
  117. constexpr auto rhs = std::make_tuple(_a);
  118. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  119. BOOST_CHECK_EQUAL( num, 0 );
  120. }
  121. {
  122. constexpr auto lhs = std::make_tuple(_a);
  123. constexpr auto rhs = std::make_tuple(_a);
  124. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  125. BOOST_CHECK_EQUAL( num, 1 );
  126. }
  127. {
  128. constexpr auto lhs = std::make_tuple(_a,_b);
  129. constexpr auto rhs = std::make_tuple(_a);
  130. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  131. BOOST_CHECK_EQUAL( num, 1 );
  132. }
  133. {
  134. constexpr auto lhs = std::make_tuple(_b);
  135. constexpr auto rhs = std::make_tuple(_a,_b);
  136. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  137. BOOST_CHECK_EQUAL( num, 1 );
  138. }
  139. {
  140. constexpr auto lhs = std::make_tuple(_a);
  141. constexpr auto rhs = std::make_tuple(_a);
  142. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  143. BOOST_CHECK_EQUAL( num, 1 );
  144. }
  145. {
  146. constexpr auto lhs = std::make_tuple(_a,_b);
  147. constexpr auto rhs = std::make_tuple(_a,_b);
  148. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  149. BOOST_CHECK_EQUAL( num, 2 );
  150. }
  151. {
  152. constexpr auto lhs = std::make_tuple(_b,_a);
  153. constexpr auto rhs = std::make_tuple(_a,_b);
  154. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  155. BOOST_CHECK_EQUAL( num, 2 );
  156. }
  157. {
  158. constexpr auto lhs = std::make_tuple(_b,_a,_c);
  159. constexpr auto rhs = std::make_tuple(_a,_b);
  160. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  161. BOOST_CHECK_EQUAL( num, 2 );
  162. }
  163. {
  164. constexpr auto lhs = std::make_tuple(_b,_a,_c);
  165. constexpr auto rhs = std::make_tuple(_a,_b,_d);
  166. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  167. BOOST_CHECK_EQUAL( num, 2 );
  168. }
  169. {
  170. constexpr auto lhs = std::make_tuple(_b,_a,_d);
  171. constexpr auto rhs = std::make_tuple(_a,_b,_d);
  172. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  173. BOOST_CHECK_EQUAL( num, 3 );
  174. }
  175. {
  176. constexpr auto lhs = std::make_tuple(_b,_a,_d);
  177. constexpr auto rhs = std::make_tuple(_a,_b,_d,_);
  178. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  179. BOOST_CHECK_EQUAL( num, 3 );
  180. }
  181. {
  182. constexpr auto lhs = std::make_tuple(_b,_a,_d,_);
  183. constexpr auto rhs = std::make_tuple(_a,_b,_d,_);
  184. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  185. BOOST_CHECK_EQUAL( num, 3 );
  186. }
  187. {
  188. constexpr auto lhs = std::make_tuple(_b,_a,_d,_);
  189. constexpr auto rhs = std::make_tuple( _,_b,_d,_);
  190. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  191. BOOST_CHECK_EQUAL( num, 2 );
  192. }
  193. {
  194. constexpr auto lhs = std::make_tuple(_,_a,_d,_);
  195. constexpr auto rhs = std::make_tuple(_,_b,_d,_);
  196. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  197. BOOST_CHECK_EQUAL( num, 1 );
  198. }
  199. {
  200. constexpr auto lhs = std::make_tuple(_,_a,_d,_);
  201. constexpr auto rhs = std::make_tuple(_,_b,_d,_,_);
  202. constexpr auto num = number_equal_indexes<decltype(lhs), decltype(rhs)>::value;
  203. BOOST_CHECK_EQUAL( num, 1 );
  204. }
  205. }
  206. BOOST_AUTO_TEST_CASE ( test_multi_index_index_position )
  207. {
  208. using namespace boost::numeric::ublas;
  209. using namespace boost::numeric::ublas::index;
  210. {
  211. constexpr auto tuple = std::tuple<>{};
  212. constexpr auto ind = index_position<decltype(_),decltype(tuple)>::value;
  213. BOOST_CHECK_EQUAL(ind,0);
  214. }
  215. {
  216. constexpr auto tuple = std::make_tuple(_);
  217. constexpr auto ind = index_position<decltype(_),decltype(tuple)>::value;
  218. BOOST_CHECK_EQUAL(ind,0);
  219. }
  220. {
  221. constexpr auto tuple = std::make_tuple(_);
  222. constexpr auto ind = index_position<decltype(_a),decltype(tuple)>::value;
  223. BOOST_CHECK_EQUAL(ind,1);
  224. }
  225. {
  226. constexpr auto tuple = std::make_tuple(_,_a);
  227. constexpr auto ind = index_position<decltype(_),decltype(tuple)>::value;
  228. BOOST_CHECK_EQUAL(ind,0);
  229. }
  230. {
  231. constexpr auto tuple = std::make_tuple(_,_a);
  232. constexpr auto ind = index_position<decltype(_a),decltype(tuple)>::value;
  233. BOOST_CHECK_EQUAL(ind,1);
  234. }
  235. {
  236. constexpr auto tuple = std::make_tuple(_,_a);
  237. constexpr auto ind = index_position<decltype(_b),decltype(tuple)>::value;
  238. BOOST_CHECK_EQUAL(ind,2);
  239. }
  240. {
  241. constexpr auto tuple = std::make_tuple(_c,_,_a);
  242. constexpr auto ind = index_position<decltype(_c),decltype(tuple)>::value;
  243. BOOST_CHECK_EQUAL(ind,0);
  244. }
  245. {
  246. constexpr auto tuple = std::make_tuple(_c,_,_a,_);
  247. constexpr auto ind = index_position<decltype(_),decltype(tuple)>::value;
  248. BOOST_CHECK_EQUAL(ind,1);
  249. }
  250. {
  251. constexpr auto tuple = std::make_tuple(_c,_,_a);
  252. constexpr auto ind = index_position<decltype(_a),decltype(tuple)>::value;
  253. BOOST_CHECK_EQUAL(ind,2);
  254. }
  255. {
  256. constexpr auto tuple = std::make_tuple(_c,_,_a);
  257. constexpr auto ind = index_position<decltype(_d),decltype(tuple)>::value;
  258. BOOST_CHECK_EQUAL(ind,3);
  259. }
  260. }
  261. BOOST_AUTO_TEST_CASE ( test_multi_index_index_position_pairs )
  262. {
  263. using namespace boost::numeric::ublas;
  264. using namespace boost::numeric::ublas::index;
  265. {
  266. constexpr auto lhs = std::tuple<>{};
  267. constexpr auto rhs = std::tuple<>{};
  268. auto array = index_position_pairs(lhs, rhs);
  269. BOOST_CHECK_EQUAL(array.size(), 0ul );
  270. }
  271. {
  272. constexpr auto lhs = std::make_tuple(_a);
  273. constexpr auto rhs = std::tuple<>{};
  274. auto array = index_position_pairs(lhs, rhs);
  275. BOOST_CHECK_EQUAL(array.size(), 0ul );
  276. }
  277. {
  278. constexpr auto lhs = std::tuple<>{};
  279. constexpr auto rhs = std::make_tuple(_a);
  280. auto array = index_position_pairs(lhs, rhs);
  281. BOOST_CHECK_EQUAL(array.size(), 0ul );
  282. }
  283. {
  284. constexpr auto lhs = std::make_tuple(_b);
  285. constexpr auto rhs = std::make_tuple(_a);
  286. auto array = index_position_pairs(lhs, rhs);
  287. BOOST_CHECK_EQUAL(array.size(), 0ul );
  288. }
  289. {
  290. constexpr auto lhs = std::make_tuple(_a);
  291. constexpr auto rhs = std::make_tuple(_a);
  292. auto array = index_position_pairs(lhs, rhs);
  293. BOOST_ASSERT(array.size() == 1ul );
  294. BOOST_CHECK_EQUAL(array[0].first , 0 );
  295. BOOST_CHECK_EQUAL(array[0].second, 0 );
  296. }
  297. {
  298. constexpr auto lhs = std::make_tuple(_a,_b);
  299. constexpr auto rhs = std::make_tuple(_a);
  300. auto array = index_position_pairs(lhs, rhs);
  301. BOOST_ASSERT(array.size() == 1ul );
  302. BOOST_CHECK_EQUAL(array[0].first , 0 );
  303. BOOST_CHECK_EQUAL(array[0].second, 0 );
  304. }
  305. {
  306. constexpr auto lhs = std::make_tuple(_b);
  307. constexpr auto rhs = std::make_tuple(_a,_b);
  308. auto array = index_position_pairs(lhs, rhs);
  309. BOOST_ASSERT(array.size() == 1ul );
  310. BOOST_CHECK_EQUAL(array[0].first , 0 );
  311. BOOST_CHECK_EQUAL(array[0].second, 1 );
  312. }
  313. {
  314. constexpr auto lhs = std::make_tuple(_a);
  315. constexpr auto rhs = std::make_tuple(_a);
  316. auto array = index_position_pairs(lhs, rhs);
  317. BOOST_ASSERT(array.size() == 1ul );
  318. BOOST_CHECK_EQUAL(array[0].first , 0 );
  319. BOOST_CHECK_EQUAL(array[0].second, 0 );
  320. }
  321. {
  322. constexpr auto lhs = std::make_tuple(_a,_b);
  323. constexpr auto rhs = std::make_tuple(_a,_b);
  324. auto array = index_position_pairs(lhs, rhs);
  325. BOOST_ASSERT(array.size() == 2ul );
  326. BOOST_CHECK_EQUAL(array[0].first , 0 );
  327. BOOST_CHECK_EQUAL(array[0].second, 0 );
  328. BOOST_CHECK_EQUAL(array[1].first , 1 );
  329. BOOST_CHECK_EQUAL(array[1].second, 1 );
  330. }
  331. {
  332. constexpr auto lhs = std::make_tuple(_b,_a);
  333. constexpr auto rhs = std::make_tuple(_a,_b);
  334. auto array = index_position_pairs(lhs, rhs);
  335. BOOST_ASSERT(array.size() == 2ul );
  336. BOOST_CHECK_EQUAL(array[0].first , 0 );
  337. BOOST_CHECK_EQUAL(array[0].second, 1 );
  338. BOOST_CHECK_EQUAL(array[1].first , 1 );
  339. BOOST_CHECK_EQUAL(array[1].second, 0 );
  340. }
  341. {
  342. constexpr auto lhs = std::make_tuple(_b,_a,_c);
  343. constexpr auto rhs = std::make_tuple(_a,_b);
  344. auto array = index_position_pairs(lhs, rhs);
  345. BOOST_ASSERT(array.size() == 2ul );
  346. BOOST_CHECK_EQUAL(array[0].first , 0 );
  347. BOOST_CHECK_EQUAL(array[0].second, 1 );
  348. BOOST_CHECK_EQUAL(array[1].first , 1 );
  349. BOOST_CHECK_EQUAL(array[1].second, 0 );
  350. }
  351. {
  352. constexpr auto lhs = std::make_tuple(_b,_a,_c);
  353. constexpr auto rhs = std::make_tuple(_a,_b,_d);
  354. auto array = index_position_pairs(lhs, rhs);
  355. BOOST_ASSERT(array.size() == 2ul );
  356. BOOST_CHECK_EQUAL(array[0].first , 0 );
  357. BOOST_CHECK_EQUAL(array[0].second, 1 );
  358. BOOST_CHECK_EQUAL(array[1].first , 1 );
  359. BOOST_CHECK_EQUAL(array[1].second, 0 );
  360. }
  361. {
  362. constexpr auto lhs = std::make_tuple(_b,_a,_d);
  363. constexpr auto rhs = std::make_tuple(_a,_b,_d);
  364. auto array = index_position_pairs(lhs, rhs);
  365. BOOST_ASSERT(array.size() == 3ul );
  366. BOOST_CHECK_EQUAL(array[0].first , 0 );
  367. BOOST_CHECK_EQUAL(array[0].second, 1 );
  368. BOOST_CHECK_EQUAL(array[1].first , 1 );
  369. BOOST_CHECK_EQUAL(array[1].second, 0 );
  370. BOOST_CHECK_EQUAL(array[2].first , 2 );
  371. BOOST_CHECK_EQUAL(array[2].second, 2 );
  372. }
  373. {
  374. constexpr auto lhs = std::make_tuple(_b,_a,_d);
  375. constexpr auto rhs = std::make_tuple(_a,_b,_d,_);
  376. auto array = index_position_pairs(lhs, rhs);
  377. BOOST_ASSERT(array.size() == 3ul );
  378. BOOST_CHECK_EQUAL(array[0].first , 0 );
  379. BOOST_CHECK_EQUAL(array[0].second, 1 );
  380. BOOST_CHECK_EQUAL(array[1].first , 1 );
  381. BOOST_CHECK_EQUAL(array[1].second, 0 );
  382. BOOST_CHECK_EQUAL(array[2].first , 2 );
  383. BOOST_CHECK_EQUAL(array[2].second, 2 );
  384. }
  385. {
  386. constexpr auto lhs = std::make_tuple(_b,_a,_d,_);
  387. constexpr auto rhs = std::make_tuple(_a,_b,_d,_);
  388. auto array = index_position_pairs(lhs, rhs);
  389. BOOST_ASSERT(array.size() == 3ul );
  390. BOOST_CHECK_EQUAL(array[0].first , 0 );
  391. BOOST_CHECK_EQUAL(array[0].second, 1 );
  392. BOOST_CHECK_EQUAL(array[1].first , 1 );
  393. BOOST_CHECK_EQUAL(array[1].second, 0 );
  394. BOOST_CHECK_EQUAL(array[2].first , 2 );
  395. BOOST_CHECK_EQUAL(array[2].second, 2 );
  396. }
  397. {
  398. constexpr auto lhs = std::make_tuple(_b,_a,_d,_);
  399. constexpr auto rhs = std::make_tuple( _,_b,_d,_);
  400. auto array = index_position_pairs(lhs, rhs);
  401. BOOST_ASSERT(array.size() == 2ul );
  402. BOOST_CHECK_EQUAL(array[0].first , 0 );
  403. BOOST_CHECK_EQUAL(array[0].second, 1 );
  404. BOOST_CHECK_EQUAL(array[1].first , 2 );
  405. BOOST_CHECK_EQUAL(array[1].second, 2 );
  406. }
  407. {
  408. constexpr auto lhs = std::make_tuple(_,_a,_d,_);
  409. constexpr auto rhs = std::make_tuple(_,_b,_d,_);
  410. auto array = index_position_pairs(lhs, rhs);
  411. BOOST_ASSERT(array.size() == 1ul );
  412. BOOST_CHECK_EQUAL(array[0].first , 2 );
  413. BOOST_CHECK_EQUAL(array[0].second, 2 );
  414. }
  415. {
  416. constexpr auto lhs = std::make_tuple(_,_a,_d,_);
  417. constexpr auto rhs = std::make_tuple(_,_b,_d,_,_);
  418. auto array = index_position_pairs(lhs, rhs);
  419. BOOST_ASSERT(array.size() == 1ul );
  420. BOOST_CHECK_EQUAL(array[0].first , 2 );
  421. BOOST_CHECK_EQUAL(array[0].second, 2 );
  422. }
  423. }
  424. BOOST_AUTO_TEST_CASE ( test_multi_index_array_to_vector )
  425. {
  426. using namespace boost::numeric::ublas;
  427. using namespace boost::numeric::ublas::index;
  428. auto check = [](auto const& lhs, auto const& rhs)
  429. {
  430. auto array = index_position_pairs(lhs, rhs);
  431. auto vector_pair = array_to_vector( array );
  432. BOOST_CHECK_EQUAL(vector_pair.first .size(), array.size() );
  433. BOOST_CHECK_EQUAL(vector_pair.second.size(), array.size() );
  434. for(auto i = 0ul; i < array.size(); ++i)
  435. {
  436. BOOST_CHECK_EQUAL(vector_pair.first [i], array[i].first +1 );
  437. BOOST_CHECK_EQUAL(vector_pair.second[i], array[i].second+1 );
  438. }
  439. };
  440. check(std::tuple<>{} , std::tuple<>{});
  441. check(std::make_tuple(_a) , std::tuple<>{});
  442. check(std::tuple<>{} , std::make_tuple(_a));
  443. check(std::make_tuple(_a) , std::make_tuple(_b));
  444. check(std::make_tuple(_a) , std::make_tuple(_a));
  445. check(std::make_tuple(_a,_b), std::make_tuple(_a));
  446. check(std::make_tuple(_a) , std::make_tuple(_a,_b));
  447. check(std::make_tuple(_a,_b), std::make_tuple(_a,_b));
  448. check(std::make_tuple(_b,_a), std::make_tuple(_a,_b));
  449. check(std::make_tuple(_b,_a,_c), std::make_tuple(_a,_b,_d));
  450. }
  451. BOOST_AUTO_TEST_SUITE_END()