9 #include <boost/test/unit_test.hpp> 21 int const confidence_tol = 1;
25 using confidence_type =
typename tested_type::confidence_type;
26 using estimated_delay_type =
typename tested_type::estimated_delay_type;
27 using sum2_type =
typename tested_type::sum2_type;
29 array_type a(boost::extents[S][V][nsamples]);
30 array_type b(boost::extents[S][V][nsamples]);
31 confidence_type confidence(a);
33 confidence_type expected_confidence(a);
35 estimated_delay_type argmax(a);
37 estimated_delay_type expected_argmax(a);
43 tested_type tested(a, b);
47 for (
int i = 0; i != S; ++i) {
48 for (
int j = 0; j != V; ++j, ++count) {
49 for (
int k = 0; k !=
nsamples; ++k) {
50 a[i][j][k] = float(0);
51 b[i][j][k] = float(0);
53 sum2[count] = float(0);
54 expected_argmax[count] =
static_cast<std::size_t
>(0);
55 expected_confidence[count] = float(0);
60 tested.estimate_delay(confidence, argmax, a, b, sum2);
64 confidence, expected_confidence, confidence_tol),
65 "confidence is not within tolerance(" << confidence_tol <<
")");
78 int const argmax_tol = 4;
84 using confidence_type =
typename tested_type::confidence_type;
85 using estimated_delay_type =
typename tested_type::estimated_delay_type;
86 using sum2_type =
typename tested_type::sum2_type;
88 array_type a(boost::extents[S][V][nsamples]);
89 array_type b(boost::extents[S][V][nsamples]);
90 confidence_type confidence(a);
92 confidence_type expected_confidence(a);
94 estimated_delay_type argmax(a);
96 estimated_delay_type expected_argmax(a);
102 tested_type tested(a, b);
109 for (
int i = 0; i != S; ++i) {
110 for (
int j = 0; j != V; ++j, ++count) {
111 for (
int k = 0; k !=
nsamples; ++k) {
112 a[i][j][k] = b[i][j][k];
121 tested.estimate_delay(confidence, argmax, a, b, sum2);
126 std::size_t shift = nsamples / 2;
127 for (
int i = 0; i != S; ++i) {
128 for (
int j = 0; j != V; ++j, ++count) {
129 expected_confidence[count] =
static_cast<float>(
nsamples);
130 expected_argmax[count] = shift;
131 argmax[count] = (argmax[count] + shift) % nsamples;
138 argmax, expected_argmax, argmax_tol),
139 "argmax is not within tolerance(" 140 << argmax_tol <<
"), argmax[0]=" << argmax[0]
141 <<
", expected_argmax[0]=" << expected_argmax[0]);
145 confidence, expected_confidence, confidence_tol),
146 "confidence is not within tolerance(" << confidence_tol <<
")");
157 int const delay = 2500;
159 int const argmax_tol = 4;
161 int const confidence_tol =
nsamples;
165 using confidence_type =
typename tested_type::confidence_type;
166 using estimated_delay_type =
typename tested_type::estimated_delay_type;
167 using sum2_type =
typename tested_type::sum2_type;
169 array_type a(boost::extents[S][V][nsamples]);
170 array_type b(boost::extents[S][V][nsamples]);
171 confidence_type confidence(a);
173 confidence_type expected_confidence(a);
175 estimated_delay_type argmax(a);
177 estimated_delay_type expected_argmax(a);
183 tested_type tested(a, b);
190 for (
int i = 0; i != S; ++i) {
191 for (
int j = 0; j != V; ++j, ++count) {
192 for (
int k = 0; k !=
nsamples; ++k) {
193 a[i][j][k] = b[i][j][(k + delay) % nsamples];
195 expected_argmax[count] =
static_cast<std::size_t
>(delay);
196 expected_confidence[count] =
static_cast<float>(
nsamples);
204 tested.estimate_delay(confidence, argmax, a, b, sum2);
208 argmax, expected_argmax, argmax_tol),
209 "argmax is not within tolerance(" 210 << argmax_tol <<
"), argmax[0]=" << argmax[0]
211 <<
", expected_argmax[0]=" << expected_argmax[0]);
215 confidence, expected_confidence, confidence_tol),
216 "confidence is not within tolerance(" << confidence_tol <<
")");
226 int const delay = 2500;
228 int const argmax_tol = 4;
230 int const confidence_tol =
nsamples;
234 using confidence_type =
typename tested_type::confidence_type;
235 using estimated_delay_type =
typename tested_type::estimated_delay_type;
236 using sum2_type =
typename tested_type::sum2_type;
238 array_type a(boost::extents[S][nsamples]);
239 array_type b(boost::extents[S][nsamples]);
240 confidence_type confidence(a);
242 confidence_type expected_confidence(a);
244 estimated_delay_type argmax(a);
246 estimated_delay_type expected_argmax(a);
251 tested_type tested(a, b);
258 for (
int i = 0; i != S; ++i) {
259 for (
int k = 0; k !=
nsamples; ++k) {
260 a[i][k] = b[i][(k + delay) % nsamples];
262 expected_argmax[count] =
static_cast<std::size_t
>(delay);
263 expected_confidence[count] =
static_cast<float>(
nsamples);
271 tested.estimate_delay(confidence, argmax, a, b, sum2);
275 argmax, expected_argmax, argmax_tol),
276 "argmax is not within tolerance(" 277 << argmax_tol <<
"), argmax[0]=" << argmax[0]
278 <<
", expected_argmax[0]=" << expected_argmax[0]);
282 confidence, expected_confidence, confidence_tol),
283 "confidence is not within tolerance(" << confidence_tol <<
")");
292 int const delay = 2500;
294 int const argmax_tol = 4;
296 int const confidence_tol =
nsamples;
300 using confidence_type =
typename tested_type::confidence_type;
301 using estimated_delay_type =
typename tested_type::estimated_delay_type;
302 using sum2_type =
typename tested_type::sum2_type;
304 array_type a(boost::extents[nsamples]);
305 array_type b(boost::extents[nsamples]);
306 confidence_type confidence(a);
308 confidence_type expected_confidence(a);
310 estimated_delay_type argmax(a);
312 estimated_delay_type expected_argmax(a);
317 tested_type tested(a, b);
323 for (
int k = 0; k !=
nsamples; ++k) {
324 a[k] = b[(k + delay) % nsamples];
326 expected_argmax[0] =
static_cast<std::size_t
>(delay);
327 expected_confidence[0] =
static_cast<float>(
nsamples);
333 tested.estimate_delay(confidence, argmax, a, b, sum2);
337 argmax, expected_argmax, argmax_tol),
338 "argmax is not within tolerance(" 339 << argmax_tol <<
"), argmax[0]=" << argmax[0]
340 <<
", expected_argmax[0]=" << expected_argmax[0]);
344 confidence, expected_confidence, confidence_tol),
345 "confidence is not within tolerance(" << confidence_tol <<
")");
354 int const delay = 2500;
356 int const argmax_tol = 4;
358 int const confidence_tol =
nsamples;
362 using confidence_type =
typename tested_type::confidence_type;
363 using estimated_delay_type =
typename tested_type::estimated_delay_type;
364 using sum2_type =
typename tested_type::sum2_type;
366 array_type a(nsamples);
367 array_type b(nsamples);
368 confidence_type confidence(a);
370 confidence_type expected_confidence(a);
372 estimated_delay_type argmax(a);
374 estimated_delay_type expected_argmax(a);
379 tested_type tested(a, b);
385 for (
int k = 0; k !=
nsamples; ++k) {
386 a[k] = b[(k + delay) % nsamples];
388 expected_argmax[0] =
static_cast<std::size_t
>(delay);
389 expected_confidence[0] =
static_cast<float>(
nsamples);
395 tested.estimate_delay(confidence, argmax, a, b, sum2);
399 argmax, expected_argmax, argmax_tol),
400 "argmax is not within tolerance(" 401 << argmax_tol <<
"), argmax[0]=" << argmax[0]
402 <<
", expected_argmax[0]=" << expected_argmax[0]);
406 confidence, expected_confidence, confidence_tol),
407 "confidence is not within tolerance(" << confidence_tol <<
")");
418 int const delay = 2500;
419 int const argmax_tol = 1;
421 int const confidence_tol =
nsamples;
425 using confidence_type =
typename tested_type::confidence_type;
426 using estimated_delay_type =
typename tested_type::estimated_delay_type;
427 using sum2_type =
typename tested_type::sum2_type;
429 array_type a(boost::extents[S][V][nsamples]);
430 array_type b(boost::extents[S][V][nsamples]);
431 confidence_type confidence(a);
433 confidence_type expected_confidence(a);
435 estimated_delay_type argmax(a);
437 estimated_delay_type expected_argmax(a);
443 tested_type tested(a, b);
450 for (
int i = 0; i != S; ++i) {
451 for (
int j = 0; j != V; ++j, ++count) {
452 for (
int k = 0; k !=
nsamples; ++k) {
453 a[i][j][k] = b[i][j][(k + delay) % nsamples];
455 expected_argmax[count] =
static_cast<std::size_t
>(delay);
456 expected_confidence[count] =
static_cast<double>(
nsamples);
464 tested.estimate_delay(confidence, argmax, a, b, sum2);
468 argmax, expected_argmax, argmax_tol),
469 "argmax is not within tolerance(" 470 << argmax_tol <<
"), argmax[0]=" << argmax[0]
471 <<
", expected_argmax[0]=" << expected_argmax[0]);
475 confidence, expected_confidence, confidence_tol),
476 "confidence is not within tolerance(" << confidence_tol <<
")");
486 int const delay = 2500;
487 int const argmax_tol = 1;
489 int const confidence_tol =
nsamples;
493 using confidence_type =
typename tested_type::confidence_type;
494 using estimated_delay_type =
typename tested_type::estimated_delay_type;
495 using sum2_type =
typename tested_type::sum2_type;
497 array_type a(boost::extents[S][nsamples]);
498 array_type b(boost::extents[S][nsamples]);
499 confidence_type confidence(a);
501 confidence_type expected_confidence(a);
503 estimated_delay_type argmax(a);
505 estimated_delay_type expected_argmax(a);
510 tested_type tested(a, b);
517 for (
int i = 0; i != S; ++i) {
518 for (
int k = 0; k !=
nsamples; ++k) {
519 a[i][k] = b[i][(k + delay) % nsamples];
521 expected_argmax[count] =
static_cast<std::size_t
>(delay);
522 expected_confidence[count] =
static_cast<double>(
nsamples);
530 tested.estimate_delay(confidence, argmax, a, b, sum2);
534 argmax, expected_argmax, argmax_tol),
535 "argmax is not within tolerance(" 536 << argmax_tol <<
"), argmax[0]=" << argmax[0]
537 <<
", expected_argmax[0]=" << expected_argmax[0]);
541 confidence, expected_confidence, confidence_tol),
542 "confidence is not within tolerance(" << confidence_tol <<
")");
551 int const delay = 2500;
552 int const argmax_tol = 1;
554 int const confidence_tol =
nsamples;
558 using confidence_type =
typename tested_type::confidence_type;
559 using estimated_delay_type =
typename tested_type::estimated_delay_type;
560 using sum2_type =
typename tested_type::sum2_type;
562 array_type a(boost::extents[nsamples]);
563 array_type b(boost::extents[nsamples]);
564 confidence_type confidence(a);
566 confidence_type expected_confidence(a);
568 estimated_delay_type argmax(a);
570 estimated_delay_type expected_argmax(a);
575 tested_type tested(a, b);
581 for (
int k = 0; k !=
nsamples; ++k) {
582 a[k] = b[(k + delay) % nsamples];
584 expected_argmax[0] =
static_cast<std::size_t
>(delay);
585 expected_confidence[0] =
static_cast<double>(
nsamples);
591 tested.estimate_delay(confidence, argmax, a, b, sum2);
595 argmax, expected_argmax, argmax_tol),
596 "argmax is not within tolerance(" 597 << argmax_tol <<
"), argmax[0]=" << argmax[0]
598 <<
", expected_argmax[0]=" << expected_argmax[0]);
602 confidence, expected_confidence, confidence_tol),
603 "confidence is not within tolerance(" << confidence_tol <<
")");
612 int const delay = 2500;
613 int const argmax_tol = 1;
615 int const confidence_tol =
nsamples;
619 using confidence_type =
typename tested_type::confidence_type;
620 using estimated_delay_type =
typename tested_type::estimated_delay_type;
621 using sum2_type =
typename tested_type::sum2_type;
623 array_type a(nsamples);
624 array_type b(nsamples);
625 confidence_type confidence(a);
627 confidence_type expected_confidence(a);
629 estimated_delay_type argmax(a);
631 estimated_delay_type expected_argmax(a);
636 tested_type tested(a, b);
642 for (
int k = 0; k !=
nsamples; ++k) {
643 a[k] = b[(k + delay) % nsamples];
645 expected_argmax[0] =
static_cast<std::size_t
>(delay);
646 expected_confidence[0] =
static_cast<double>(
nsamples);
652 tested.estimate_delay(confidence, argmax, a, b, sum2);
656 argmax, expected_argmax, argmax_tol),
657 "argmax is not within tolerance(" 658 << argmax_tol <<
"), argmax[0]=" << argmax[0]
659 <<
", expected_argmax[0]=" << expected_argmax[0]);
663 confidence, expected_confidence, confidence_tol),
664 "confidence is not within tolerance(" << confidence_tol <<
")");
675 int const delay = 2500;
677 int const argmax_tol = 4;
679 int const confidence_tol =
nsamples;
683 using confidence_type =
typename tested_type::confidence_type;
684 using estimated_delay_type =
typename tested_type::estimated_delay_type;
685 using sum2_type =
typename tested_type::sum2_type;
687 array_type a(boost::extents[S][V][nsamples]);
688 array_type b(boost::extents[S][V][nsamples]);
689 confidence_type confidence(a);
691 confidence_type expected_confidence(a);
693 estimated_delay_type argmax(a);
695 estimated_delay_type expected_argmax(a);
701 tested_type tested(a, b);
708 for (
int i = 0; i != S; ++i) {
709 for (
int j = 0; j != V; ++j, ++count) {
710 for (
int k = 0; k !=
nsamples; ++k) {
711 a[i][j][k] = b[i][j][(k + delay) % nsamples];
713 expected_argmax[count] =
static_cast<std::size_t
>(delay);
714 expected_confidence[count] =
static_cast<float>(
nsamples);
722 tested.estimate_delay(confidence, argmax, a, b, sum2);
726 argmax, expected_argmax, argmax_tol),
727 "argmax is not within tolerance(" 728 << argmax_tol <<
"), argmax[0]=" << argmax[0]
729 <<
", expected_argmax[0]=" << expected_argmax[0]);
733 confidence, expected_confidence, confidence_tol),
734 "confidence is not within tolerance(" << confidence_tol <<
")");
744 int const delay = 2500;
746 int const argmax_tol = 4;
748 int const confidence_tol =
nsamples;
752 using confidence_type =
typename tested_type::confidence_type;
753 using estimated_delay_type =
typename tested_type::estimated_delay_type;
754 using sum2_type =
typename tested_type::sum2_type;
756 array_type a(boost::extents[S][nsamples]);
757 array_type b(boost::extents[S][nsamples]);
758 confidence_type confidence(a);
760 confidence_type expected_confidence(a);
762 estimated_delay_type argmax(a);
764 estimated_delay_type expected_argmax(a);
769 tested_type tested(a, b);
776 for (
int i = 0; i != S; ++i) {
777 for (
int k = 0; k !=
nsamples; ++k) {
778 a[i][k] = b[i][(k + delay) % nsamples];
780 expected_argmax[count] =
static_cast<std::size_t
>(delay);
781 expected_confidence[count] =
static_cast<float>(
nsamples);
789 tested.estimate_delay(confidence, argmax, a, b, sum2);
793 argmax, expected_argmax, argmax_tol),
794 "argmax is not within tolerance(" 795 << argmax_tol <<
"), argmax[0]=" << argmax[0]
796 <<
", expected_argmax[0]=" << expected_argmax[0]);
800 confidence, expected_confidence, confidence_tol),
801 "confidence is not within tolerance(" << confidence_tol <<
")");
810 int const delay = 2500;
812 int const argmax_tol = 4;
814 int const confidence_tol =
nsamples;
818 using confidence_type =
typename tested_type::confidence_type;
819 using estimated_delay_type =
typename tested_type::estimated_delay_type;
820 using sum2_type =
typename tested_type::sum2_type;
822 array_type a(boost::extents[nsamples]);
823 array_type b(boost::extents[nsamples]);
824 confidence_type confidence(a);
826 confidence_type expected_confidence(a);
828 estimated_delay_type argmax(a);
830 estimated_delay_type expected_argmax(a);
835 tested_type tested(a, b);
841 for (
int k = 0; k !=
nsamples; ++k) {
842 a[k] = b[(k + delay) % nsamples];
844 expected_argmax[0] =
static_cast<std::size_t
>(delay);
845 expected_confidence[0] =
static_cast<float>(
nsamples);
851 tested.estimate_delay(confidence, argmax, a, b, sum2);
855 argmax, expected_argmax, argmax_tol),
856 "argmax is not within tolerance(" 857 << argmax_tol <<
"), argmax[0]=" << argmax[0]
858 <<
", expected_argmax[0]=" << expected_argmax[0]);
862 confidence, expected_confidence, confidence_tol),
863 "confidence is not within tolerance(" << confidence_tol <<
")");
872 int const delay = 2500;
874 int const argmax_tol = 4;
876 int const confidence_tol =
nsamples;
880 using confidence_type =
typename tested_type::confidence_type;
881 using estimated_delay_type =
typename tested_type::estimated_delay_type;
882 using sum2_type =
typename tested_type::sum2_type;
884 array_type a(nsamples);
885 array_type b(nsamples);
886 confidence_type confidence(a);
888 confidence_type expected_confidence(a);
890 estimated_delay_type argmax(a);
892 estimated_delay_type expected_argmax(a);
896 tested_type tested(a, b);
902 for (
int k = 0; k !=
nsamples; ++k) {
903 a[k] = b[(k + delay) % nsamples];
905 expected_argmax[0] =
static_cast<std::size_t
>(delay);
906 expected_confidence[0] =
static_cast<float>(
nsamples);
912 tested.estimate_delay(confidence, argmax, a, b, sum2);
916 argmax, expected_argmax, argmax_tol),
917 "argmax is not within tolerance(" 918 << argmax_tol <<
"), argmax[0]=" << argmax[0]
919 <<
", expected_argmax[0]=" << expected_argmax[0]);
923 confidence, expected_confidence, confidence_tol),
924 "confidence is not within tolerance(" << confidence_tol <<
")");
935 int const delay = 2500;
936 int const argmax_tol = 1;
938 int const confidence_tol =
nsamples;
942 using confidence_type =
typename tested_type::confidence_type;
943 using estimated_delay_type =
typename tested_type::estimated_delay_type;
944 using sum2_type =
typename tested_type::sum2_type;
946 array_type a(boost::extents[S][V][nsamples]);
947 array_type b(boost::extents[S][V][nsamples]);
948 confidence_type confidence(a);
950 confidence_type expected_confidence(a);
952 estimated_delay_type argmax(a);
954 estimated_delay_type expected_argmax(a);
960 tested_type tested(a, b);
967 for (
int i = 0; i != S; ++i) {
968 for (
int j = 0; j != V; ++j, ++count) {
969 for (
int k = 0; k !=
nsamples; ++k) {
970 a[i][j][k] = b[i][j][(k + delay) % nsamples];
972 expected_argmax[count] =
static_cast<std::size_t
>(delay);
973 expected_confidence[count] =
static_cast<double>(
nsamples);
981 tested.estimate_delay(confidence, argmax, a, b, sum2);
985 argmax, expected_argmax, argmax_tol),
986 "argmax is not within tolerance(" 987 << argmax_tol <<
"), argmax[0]=" << argmax[0]
988 <<
", expected_argmax[0]=" << expected_argmax[0]);
992 confidence, expected_confidence, confidence_tol),
993 "confidence is not within tolerance(" << confidence_tol <<
")");
1003 int const delay = 2500;
1004 int const argmax_tol = 1;
1006 int const confidence_tol =
nsamples;
1010 using confidence_type =
typename tested_type::confidence_type;
1011 using estimated_delay_type =
typename tested_type::estimated_delay_type;
1012 using sum2_type =
typename tested_type::sum2_type;
1014 array_type a(boost::extents[S][nsamples]);
1015 array_type b(boost::extents[S][nsamples]);
1016 confidence_type confidence(a);
1018 confidence_type expected_confidence(a);
1020 estimated_delay_type argmax(a);
1022 estimated_delay_type expected_argmax(a);
1027 tested_type tested(a, b);
1034 for (
int i = 0; i != S; ++i) {
1035 for (
int k = 0; k !=
nsamples; ++k) {
1036 a[i][k] = b[i][(k + delay) % nsamples];
1038 expected_argmax[count] =
static_cast<std::size_t
>(delay);
1039 expected_confidence[count] =
static_cast<double>(
nsamples);
1047 tested.estimate_delay(confidence, argmax, a, b, sum2);
1049 BOOST_CHECK_MESSAGE(
1051 argmax, expected_argmax, argmax_tol),
1052 "argmax is not within tolerance(" 1053 << argmax_tol <<
"), argmax[0]=" << argmax[0]
1054 <<
", expected_argmax[0]=" << expected_argmax[0]);
1056 BOOST_CHECK_MESSAGE(
1058 confidence, expected_confidence, confidence_tol),
1059 "confidence is not within tolerance(" << confidence_tol <<
")");
1068 int const delay = 2500;
1069 int const argmax_tol = 1;
1071 int const confidence_tol =
nsamples;
1075 using confidence_type =
typename tested_type::confidence_type;
1076 using estimated_delay_type =
typename tested_type::estimated_delay_type;
1077 using sum2_type =
typename tested_type::sum2_type;
1079 array_type a(boost::extents[nsamples]);
1080 array_type b(boost::extents[nsamples]);
1081 confidence_type confidence(a);
1083 confidence_type expected_confidence(a);
1085 estimated_delay_type argmax(a);
1087 estimated_delay_type expected_argmax(a);
1092 tested_type tested(a, b);
1098 for (
int k = 0; k !=
nsamples; ++k) {
1099 a[k] = b[(k + delay) % nsamples];
1101 expected_argmax[0] =
static_cast<std::size_t
>(delay);
1102 expected_confidence[0] =
static_cast<double>(
nsamples);
1108 tested.estimate_delay(confidence, argmax, a, b, sum2);
1110 BOOST_CHECK_MESSAGE(
1112 argmax, expected_argmax, argmax_tol),
1113 "argmax is not within tolerance(" 1114 << argmax_tol <<
"), argmax[0]=" << argmax[0]
1115 <<
", expected_argmax[0]=" << expected_argmax[0]);
1117 BOOST_CHECK_MESSAGE(
1119 confidence, expected_confidence, confidence_tol),
1120 "confidence is not within tolerance(" << confidence_tol <<
")");
1129 int const delay = 2500;
1130 int const argmax_tol = 1;
1132 int const confidence_tol =
nsamples;
1136 using confidence_type =
typename tested_type::confidence_type;
1137 using estimated_delay_type =
typename tested_type::estimated_delay_type;
1138 using sum2_type =
typename tested_type::sum2_type;
1140 array_type a(nsamples);
1141 array_type b(nsamples);
1142 confidence_type confidence(a);
1144 confidence_type expected_confidence(a);
1146 estimated_delay_type argmax(a);
1148 estimated_delay_type expected_argmax(a);
1153 tested_type tested(a, b);
1159 for (
int k = 0; k !=
nsamples; ++k) {
1160 a[k] = b[(k + delay) % nsamples];
1162 expected_argmax[0] =
static_cast<std::size_t
>(delay);
1163 expected_confidence[0] =
static_cast<double>(
nsamples);
1169 tested.estimate_delay(confidence, argmax, a, b, sum2);
1171 BOOST_CHECK_MESSAGE(
1173 argmax, expected_argmax, argmax_tol),
1174 "argmax is not within tolerance(" 1175 << argmax_tol <<
"), argmax[0]=" << argmax[0]
1176 <<
", expected_argmax[0]=" << expected_argmax[0]);
1178 BOOST_CHECK_MESSAGE(
1180 confidence, expected_confidence, confidence_tol),
1181 "confidence is not within tolerance(" << confidence_tol <<
")");
1195 array_type a(boost::extents[S][V][nsamples]);
1196 array_type b(boost::extents[S - 1][V][nsamples]);
1197 array_type c(boost::extents[S][V][nsamples]);
1199 using confidence_type =
typename tested_type::confidence_type;
1200 using estimated_delay_type =
typename tested_type::estimated_delay_type;
1201 using sum2_type =
typename tested_type::sum2_type;
1203 confidence_type confidence(a);
1204 estimated_delay_type argmax(a);
1208 BOOST_CHECK_THROW(tested_type tested(a, b), std::exception);
1210 tested_type tested2(a, c);
1213 tested2.estimate_delay(confidence, argmax, a, b, sum2), std::exception);
1215 tested2.estimate_delay(confidence, argmax, b, c, sum2), std::exception);
std::vector< T, jb::fftw::allocator< T > > aligned_vector
Alias std::vector with properly allocated storage for FFTW3.
auto sum_square(container_t const &ts)
Compute the sum square of a family of timeseries.
boost::multi_array< value_type, num_dims, jb::fftw::allocator< value_type > > aligned_multi_array
Alias boost::multi_array with properly allocated storage for FFTW3.
BOOST_AUTO_TEST_CASE(fftw_time_delay_estimator_many_3_dim_tde_with_0)
void create_triangle_timeseries(int nsamples, timeseries &ts)
Create a simple timeseries where the values look like a triangle.
A time delay estimator based on cross-correlation.
bool check_collection_close_enough(collection_t const &a, collection_t const &b, int tol=1, int max_differences_printed=JB_TESTING_MAX_DIFFERENCES_PRINTED)
Given two collections of numbers of the same value type, find the differences that are out of a given...
std::size_t nsamples(container_type const &a)
Count the elements in the last dimension of a vector-like container.