95 auto rowWriterA = builderA.
persist<int32_t, int32_t,
float>({
"x",
"y",
"floatZ"});
96 rowWriterA(0, 0, 25, -6.0f);
97 rowWriterA(0, 1, 18, 0.0f);
98 rowWriterA(0, 2, 48, 8.0f);
99 rowWriterA(0, 3, 103, 2.0f);
100 rowWriterA(0, 4, 28, -6.0f);
101 rowWriterA(0, 5, 102, 2.0f);
102 rowWriterA(0, 6, 12, 0.0f);
103 rowWriterA(0, 7, 24, -7.0f);
105 REQUIRE(tableA->num_rows() == 8);
108 auto rowWriterB = builderB.
persist<int32_t>({
"x"});
114 REQUIRE(tableB->num_rows() == 4);
120 TestA testsA{tableA};
121 TestB testsB{tableB};
122 ConcatTest concatTests{tableA, tableB};
123 REQUIRE(8 == testsA.size());
124 REQUIRE(12 == concatTests.size());
129 std::vector<double> yBins{
VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 101};
130 std::vector<double> zBins{
VARIABLE_WIDTH, -7.0, -5.0, -3.0, -1.0, 1.0, 3.0, 5.0, 7.0};
135 REQUIRE(!(
static_cast<test::X
>(std::get<0>(*(combIt))).getIterator().mCurrentPos ==
nullptr));
136 REQUIRE(*(
static_cast<test::X
>(std::get<0>(*(combIt))).getIterator().mCurrentPos) == 0);
137 REQUIRE(
static_cast<test::X
>(std::get<0>(*(combIt))).getIterator().mCurrentChunk == 0);
138 REQUIRE(!(
static_cast<test::X
>(std::get<1>(*(combIt))).getIterator().mCurrentPos ==
nullptr));
139 REQUIRE(*(
static_cast<test::X
>(std::get<1>(*(combIt))).getIterator().mCurrentPos) == 1);
140 REQUIRE(
static_cast<test::X
>(std::get<1>(*(combIt))).getIterator().mCurrentChunk == 0);
147 auto beginCombination = *(comb2.begin());
148 REQUIRE(!(
static_cast<test::X
>(std::get<0>(beginCombination)).getIterator().mCurrentPos ==
nullptr));
149 REQUIRE(*(
static_cast<test::X
>(std::get<0>(beginCombination)).getIterator().mCurrentPos) == 0);
150 REQUIRE(
static_cast<test::X
>(std::get<0>(beginCombination)).getIterator().mCurrentChunk == 0);
151 REQUIRE(!(
static_cast<test::X
>(std::get<1>(beginCombination)).getIterator().mCurrentPos ==
nullptr));
152 REQUIRE(*(
static_cast<test::X
>(std::get<1>(beginCombination)).getIterator().mCurrentPos) == 1);
153 REQUIRE(
static_cast<test::X
>(std::get<1>(beginCombination)).getIterator().mCurrentChunk == 0);
155 REQUIRE(!(comb2.begin() == comb2.end()));
157 auto endCombination = *(comb2.end());
158 REQUIRE(!(
static_cast<test::X
>(std::get<0>(endCombination)).getIterator().mCurrentPos ==
nullptr));
159 REQUIRE(*(
static_cast<test::X
>(std::get<0>(endCombination)).getIterator().mCurrentPos) == 8);
160 REQUIRE(
static_cast<test::X
>(std::get<0>(endCombination)).getIterator().mCurrentChunk == 0);
161 REQUIRE(!(
static_cast<test::X
>(std::get<1>(endCombination)).getIterator().mCurrentPos ==
nullptr));
162 REQUIRE(*(
static_cast<test::X
>(std::get<1>(endCombination)).getIterator().mCurrentPos) == 8);
163 REQUIRE(
static_cast<test::X
>(std::get<1>(endCombination)).getIterator().mCurrentChunk == 0);
170 REQUIRE(!(
static_cast<test::X
>(std::get<0>(*(combItFiltered))).getIterator().mCurrentPos ==
nullptr));
171 REQUIRE(*(
static_cast<test::X
>(std::get<0>(*(combItFiltered))).getIterator().mCurrentPos) == 4);
172 REQUIRE(
static_cast<test::X
>(std::get<0>(*(combItFiltered))).getIterator().mCurrentChunk == 0);
173 REQUIRE(!(
static_cast<test::X
>(std::get<1>(*(combItFiltered))).getIterator().mCurrentPos ==
nullptr));
174 REQUIRE(*(
static_cast<test::X
>(std::get<1>(*(combItFiltered))).getIterator().mCurrentPos) == 5);
175 REQUIRE(
static_cast<test::X
>(std::get<1>(*(combItFiltered))).getIterator().mCurrentChunk == 0);
182 auto beginFilterCombination = *(comb2Filter.begin());
183 REQUIRE(!(
static_cast<test::X
>(std::get<0>(beginFilterCombination)).getIterator().mCurrentPos ==
nullptr));
184 REQUIRE(*(
static_cast<test::X
>(std::get<0>(beginFilterCombination)).getIterator().mCurrentPos) == 4);
185 REQUIRE(
static_cast<test::X
>(std::get<0>(beginFilterCombination)).getIterator().mCurrentChunk == 0);
186 REQUIRE(!(
static_cast<test::X
>(std::get<1>(beginFilterCombination)).getIterator().mCurrentPos ==
nullptr));
187 REQUIRE(*(
static_cast<test::X
>(std::get<1>(beginFilterCombination)).getIterator().mCurrentPos) == 5);
188 REQUIRE(
static_cast<test::X
>(std::get<1>(beginFilterCombination)).getIterator().mCurrentChunk == 0);
190 REQUIRE(!(comb2Filter.begin() == comb2Filter.end()));
192 auto endFilterCombination = *(comb2Filter.end());
193 REQUIRE(!(
static_cast<test::X
>(std::get<0>(endFilterCombination)).getIterator().mCurrentPos ==
nullptr));
194 REQUIRE(*(
static_cast<test::X
>(std::get<0>(endFilterCombination)).getIterator().mCurrentPos) == -1);
195 REQUIRE(
static_cast<test::X
>(std::get<0>(endFilterCombination)).getIterator().mCurrentChunk == 0);
196 REQUIRE(!(
static_cast<test::X
>(std::get<1>(endFilterCombination)).getIterator().mCurrentPos ==
nullptr));
197 REQUIRE(*(
static_cast<test::X
>(std::get<1>(endFilterCombination)).getIterator().mCurrentPos) == -1);
198 REQUIRE(
static_cast<test::X
>(std::get<1>(endFilterCombination)).getIterator().mCurrentChunk == 0);
205 auto beginConcatCombination = *(comb2Concat.begin());
206 REQUIRE(!(
static_cast<test::X
>(std::get<0>(beginConcatCombination)).getIterator().mCurrentPos ==
nullptr));
207 REQUIRE(*(
static_cast<test::X
>(std::get<0>(beginConcatCombination)).getIterator().mCurrentPos) == 0);
208 REQUIRE(
static_cast<test::X
>(std::get<0>(beginConcatCombination)).getIterator().mCurrentChunk == 0);
209 REQUIRE(!(
static_cast<test::X
>(std::get<1>(beginConcatCombination)).getIterator().mCurrentPos ==
nullptr));
210 REQUIRE(*(
static_cast<test::X
>(std::get<1>(beginConcatCombination)).getIterator().mCurrentPos) == 1);
211 REQUIRE(
static_cast<test::X
>(std::get<1>(beginConcatCombination)).getIterator().mCurrentChunk == 0);
213 REQUIRE(!(comb2Concat.begin() == comb2Concat.end()));
217 auto endConcatCombination = *(comb2Concat.end());
218 REQUIRE(!(
static_cast<test::X
>(std::get<0>(endConcatCombination)).getIterator().mCurrentPos ==
nullptr));
219 REQUIRE(*(
static_cast<test::X
>(std::get<0>(endConcatCombination)).getIterator().mCurrentPos) == 12);
220 REQUIRE(
static_cast<test::X
>(std::get<0>(endConcatCombination)).getIterator().mCurrentChunk == 0);
221 REQUIRE(!(
static_cast<test::X
>(std::get<1>(endConcatCombination)).getIterator().mCurrentPos ==
nullptr));
222 REQUIRE(*(
static_cast<test::X
>(std::get<1>(endConcatCombination)).getIterator().mCurrentPos) == 12);
223 REQUIRE(
static_cast<test::X
>(std::get<1>(endConcatCombination)).getIterator().mCurrentChunk == 0);
230 auto beginDiffCombination = *(comb2Diff.begin());
231 REQUIRE(!(
static_cast<test::X
>(std::get<0>(beginDiffCombination)).getIterator().mCurrentPos ==
nullptr));
232 REQUIRE(*(
static_cast<test::X
>(std::get<0>(beginDiffCombination)).getIterator().mCurrentPos) == 0);
233 REQUIRE(
static_cast<test::X
>(std::get<0>(beginDiffCombination)).getIterator().mCurrentChunk == 0);
234 REQUIRE(!(
static_cast<test::X
>(std::get<1>(beginDiffCombination)).getIterator().mCurrentPos ==
nullptr));
235 REQUIRE(*(
static_cast<test::X
>(std::get<1>(beginDiffCombination)).getIterator().mCurrentPos) == 0);
236 REQUIRE(
static_cast<test::X
>(std::get<1>(beginDiffCombination)).getIterator().mCurrentChunk == 0);
238 REQUIRE(!(comb2Diff.begin() == comb2Diff.end()));
240 auto endDiffCombination = *(comb2Diff.end());
241 REQUIRE(!(
static_cast<test::X
>(std::get<0>(endDiffCombination)).getIterator().mCurrentPos ==
nullptr));
242 REQUIRE(*(
static_cast<test::X
>(std::get<0>(endDiffCombination)).getIterator().mCurrentPos) == 8);
243 REQUIRE(
static_cast<test::X
>(std::get<0>(endDiffCombination)).getIterator().mCurrentChunk == 0);
244 REQUIRE(!(
static_cast<test::X
>(std::get<1>(endDiffCombination)).getIterator().mCurrentPos ==
nullptr));
245 REQUIRE(*(
static_cast<test::X
>(std::get<1>(endDiffCombination)).getIterator().mCurrentPos) == 4);
246 REQUIRE(
static_cast<test::X
>(std::get<1>(endDiffCombination)).getIterator().mCurrentChunk == 0);
254 auto beginBadCombination = *(comb2Bad.begin());
255 REQUIRE(!(
static_cast<test::X
>(std::get<0>(beginBadCombination)).getIterator().mCurrentPos ==
nullptr));
256 REQUIRE(*(
static_cast<test::X
>(std::get<0>(beginBadCombination)).getIterator().mCurrentPos) == 0);
257 REQUIRE(
static_cast<test::X
>(std::get<0>(beginBadCombination)).getIterator().mCurrentChunk == 0);
258 REQUIRE(!(
static_cast<test::X
>(std::get<1>(beginBadCombination)).getIterator().mCurrentPos ==
nullptr));
259 REQUIRE(*(
static_cast<test::X
>(std::get<1>(beginBadCombination)).getIterator().mCurrentPos) == 0);
260 REQUIRE(
static_cast<test::X
>(std::get<1>(beginBadCombination)).getIterator().mCurrentChunk == 0);
261 REQUIRE(!(
static_cast<test::X
>(std::get<2>(beginBadCombination)).getIterator().mCurrentPos ==
nullptr));
262 REQUIRE(*(
static_cast<test::X
>(std::get<2>(beginBadCombination)).getIterator().mCurrentPos) == 0);
263 REQUIRE(
static_cast<test::X
>(std::get<2>(beginBadCombination)).getIterator().mCurrentChunk == 0);
264 REQUIRE(!(
static_cast<test::X
>(std::get<3>(beginBadCombination)).getIterator().mCurrentPos ==
nullptr));
265 REQUIRE(*(
static_cast<test::X
>(std::get<3>(beginBadCombination)).getIterator().mCurrentPos) == 0);
266 REQUIRE(
static_cast<test::X
>(std::get<3>(beginBadCombination)).getIterator().mCurrentChunk == 0);
267 REQUIRE(!(
static_cast<test::X
>(std::get<4>(beginBadCombination)).getIterator().mCurrentPos ==
nullptr));
268 REQUIRE(*(
static_cast<test::X
>(std::get<4>(beginBadCombination)).getIterator().mCurrentPos) == 0);
269 REQUIRE(
static_cast<test::X
>(std::get<4>(beginBadCombination)).getIterator().mCurrentChunk == 0);
273 auto endBadCombination = *(comb2Bad.end());
274 REQUIRE(!(
static_cast<test::X
>(std::get<0>(endBadCombination)).getIterator().mCurrentPos ==
nullptr));
275 REQUIRE(*(
static_cast<test::X
>(std::get<0>(endBadCombination)).getIterator().mCurrentPos) == 4);
276 REQUIRE(
static_cast<test::X
>(std::get<0>(endBadCombination)).getIterator().mCurrentChunk == 0);
277 REQUIRE(!(
static_cast<test::X
>(std::get<1>(endBadCombination)).getIterator().mCurrentPos ==
nullptr));
278 REQUIRE(*(
static_cast<test::X
>(std::get<1>(endBadCombination)).getIterator().mCurrentPos) == 4);
279 REQUIRE(
static_cast<test::X
>(std::get<1>(endBadCombination)).getIterator().mCurrentChunk == 0);
280 REQUIRE(!(
static_cast<test::X
>(std::get<2>(endBadCombination)).getIterator().mCurrentPos ==
nullptr));
281 REQUIRE(*(
static_cast<test::X
>(std::get<2>(endBadCombination)).getIterator().mCurrentPos) == 4);
282 REQUIRE(
static_cast<test::X
>(std::get<2>(endBadCombination)).getIterator().mCurrentChunk == 0);
283 REQUIRE(!(
static_cast<test::X
>(std::get<3>(endBadCombination)).getIterator().mCurrentPos ==
nullptr));
284 REQUIRE(*(
static_cast<test::X
>(std::get<3>(endBadCombination)).getIterator().mCurrentPos) == 4);
285 REQUIRE(
static_cast<test::X
>(std::get<3>(endBadCombination)).getIterator().mCurrentChunk == 0);
286 REQUIRE(!(
static_cast<test::X
>(std::get<4>(endBadCombination)).getIterator().mCurrentPos ==
nullptr));
287 REQUIRE(*(
static_cast<test::X
>(std::get<4>(endBadCombination)).getIterator().mCurrentPos) == 4);
288 REQUIRE(
static_cast<test::X
>(std::get<4>(endBadCombination)).getIterator().mCurrentChunk == 0);
295 auto beginBlockCombination = *(combBlock.begin());
296 REQUIRE(!(
static_cast<test::X
>(std::get<0>(beginBlockCombination)).getIterator().mCurrentPos ==
nullptr));
297 REQUIRE(*(
static_cast<test::X
>(std::get<0>(beginBlockCombination)).getIterator().mCurrentPos) == 0);
298 REQUIRE(
static_cast<test::X
>(std::get<0>(beginBlockCombination)).getIterator().mCurrentChunk == 0);
299 REQUIRE(!(
static_cast<test::X
>(std::get<1>(beginBlockCombination)).getIterator().mCurrentPos ==
nullptr));
300 REQUIRE(*(
static_cast<test::X
>(std::get<1>(beginBlockCombination)).getIterator().mCurrentPos) == 4);
301 REQUIRE(
static_cast<test::X
>(std::get<1>(beginBlockCombination)).getIterator().mCurrentChunk == 0);
303 REQUIRE(!(combBlock.begin() == combBlock.end()));
305 auto endBlockCombination = *(combBlock.end());
306 REQUIRE(!(
static_cast<test::X
>(std::get<0>(endBlockCombination)).getIterator().mCurrentPos ==
nullptr));
307 REQUIRE(*(
static_cast<test::X
>(std::get<0>(endBlockCombination)).getIterator().mCurrentPos) == 8);
308 REQUIRE(
static_cast<test::X
>(std::get<0>(endBlockCombination)).getIterator().mCurrentChunk == 0);
309 REQUIRE(!(
static_cast<test::X
>(std::get<1>(endBlockCombination)).getIterator().mCurrentPos ==
nullptr));
310 REQUIRE(*(
static_cast<test::X
>(std::get<1>(endBlockCombination)).getIterator().mCurrentPos) == 8);
311 REQUIRE(
static_cast<test::X
>(std::get<1>(endBlockCombination)).getIterator().mCurrentChunk == 0);
910 auto rowWriterA = builderA.
persist<int32_t, int32_t,
float>({
"x",
"y",
"floatZ"});
911 rowWriterA(0, 0, 25, -6.0f);
912 rowWriterA(0, 1, 18, 0.0f);
913 rowWriterA(0, 2, 48, 8.0f);
914 rowWriterA(0, 3, 103, 2.0f);
915 rowWriterA(0, 4, 28, -6.0f);
916 rowWriterA(0, 5, 102, 2.0f);
917 rowWriterA(0, 6, 12, 0.0f);
918 rowWriterA(0, 7, 24, -7.0f);
919 rowWriterA(0, 8, 41, 8.0f);
920 rowWriterA(0, 9, 49, 8.0f);
922 REQUIRE(tableA->num_rows() == 10);
926 REQUIRE(10 == testA.size());
929 auto rowWriterAHalf = builderAHalf.
persist<int32_t, int32_t,
float>({
"x",
"y",
"floatZ"});
930 rowWriterAHalf(0, 0, 25, -6.0f);
931 rowWriterAHalf(0, 1, 18, 0.0f);
932 rowWriterAHalf(0, 2, 48, 8.0f);
933 rowWriterAHalf(0, 3, 103, 2.0f);
934 rowWriterAHalf(0, 4, 28, -6.0f);
935 auto tableAHalf = builderAHalf.
finalize();
936 REQUIRE(tableAHalf->num_rows() == 5);
938 TestA testAHalf{tableAHalf};
939 REQUIRE(5 == testAHalf.size());
944 std::vector<double> yBins{
VARIABLE_WIDTH, 0, 5, 10, 20, 30, 40, 50, 101};
945 std::vector<double> zBins{
VARIABLE_WIDTH, -7.0, -5.0, -3.0, -1.0, 1.0, 3.0, 5.0, 7.0};
951 std::vector<std::tuple<int32_t, int32_t>> expectedFullPairsNoOverflows{
952 {0, 0}, {0, 4}, {4, 0}, {4, 4}, {4, 7}, {7, 4}, {7, 7}, {1, 1}, {1, 6}, {6, 1}, {6, 6}};
955 REQUIRE(c0.x() == std::get<0>(expectedFullPairsNoOverflows[
count]));
956 REQUIRE(
c1.x() == std::get<1>(expectedFullPairsNoOverflows[
count]));
959 REQUIRE(
count == expectedFullPairsNoOverflows.size());
961 std::vector<std::tuple<int32_t, int32_t>> expectedFullPairs{
962 {0, 0}, {0, 4}, {0, 7}, {4, 0}, {7, 0}, {4, 4}, {4, 7}, {7, 4}, {7, 7}, {1, 1}, {1, 6}, {6, 1}, {6, 6}, {3, 3}, {3, 5}, {5, 3}, {5, 5}, {2, 2}, {2, 8}, {2, 9}, {8, 2}, {9, 2}, {8, 8}, {8, 9}, {9, 8}, {9, 9}};
965 REQUIRE(c0.x() == std::get<0>(expectedFullPairs[
count]));
966 REQUIRE(
c1.x() == std::get<1>(expectedFullPairs[
count]));
969 REQUIRE(
count == expectedFullPairs.size());
971 std::vector<std::tuple<int32_t, int32_t, int32_t>> expectedFullTriples{
972 {0, 0, 0}, {0, 0, 4}, {0, 0, 7}, {0, 4, 0}, {0, 4, 4}, {0, 4, 7}, {0, 7, 0}, {0, 7, 4}, {0, 7, 7}, {4, 0, 0}, {4, 0, 4}, {4, 0, 7}, {7, 0, 0}, {7, 0, 4}, {7, 0, 7}, {4, 4, 0}, {4, 7, 0}, {7, 4, 0}, {7, 7, 0}, {4, 4, 4}, {4, 4, 7}, {4, 7, 4}, {4, 7, 7}, {7, 4, 4}, {7, 4, 7}, {7, 7, 4}, {7, 7, 7}, {1, 1, 1}, {1, 1, 6}, {1, 6, 1}, {1, 6, 6}, {6, 1, 1}, {6, 1, 6}, {6, 6, 1}, {6, 6, 6}, {3, 3, 3}, {3, 3, 5}, {3, 5, 3}, {3, 5, 5}, {5, 3, 3}, {5, 3, 5}, {5, 5, 3}, {5, 5, 5}, {2, 2, 2}, {2, 2, 8}, {2, 2, 9}, {2, 8, 2}, {2, 8, 8}, {2, 8, 9}, {2, 9, 2}, {2, 9, 8}, {2, 9, 9}, {8, 2, 2}, {8, 2, 8}, {8, 2, 9}, {9, 2, 2}, {9, 2, 8}, {9, 2, 9}, {8, 8, 2}, {8, 9, 2}, {9, 8, 2}, {9, 9, 2}, {8, 8, 8}, {8, 8, 9}, {8, 9, 8}, {8, 9, 9}, {9, 8, 8}, {9, 8, 9}, {9, 9, 8}, {9, 9, 9}};
975 REQUIRE(c0.x() == std::get<0>(expectedFullTriples[
count]));
976 REQUIRE(
c1.x() == std::get<1>(expectedFullTriples[
count]));
977 REQUIRE(
c2.x() == std::get<2>(expectedFullTriples[
count]));
980 REQUIRE(
count == expectedFullTriples.size());
982 std::vector<std::tuple<int32_t, int32_t>> expectedUpperPairs{
983 {0, 0}, {0, 4}, {0, 7}, {4, 4}, {4, 7}, {7, 7}, {1, 1}, {1, 6}, {6, 6}, {3, 3}, {3, 5}, {5, 5}, {2, 2}, {2, 8}, {2, 9}, {8, 8}, {8, 9}, {9, 9}};
986 REQUIRE(c0.x() == std::get<0>(expectedUpperPairs[
count]));
987 REQUIRE(
c1.x() == std::get<1>(expectedUpperPairs[
count]));
990 REQUIRE(
count == expectedUpperPairs.size());
992 std::vector<std::tuple<int32_t, int32_t, int32_t>> expectedUpperTriples{
993 {0, 0, 0}, {0, 0, 4}, {0, 4, 4}, {4, 4, 4}, {4, 4, 7}, {4, 7, 7}, {7, 7, 7}, {1, 1, 1}, {1, 1, 6}, {1, 6, 6}, {6, 6, 6}, {3, 3, 3}, {3, 3, 5}, {3, 5, 5}, {5, 5, 5}, {2, 2, 2}, {2, 2, 8}, {2, 8, 8}, {8, 8, 8}, {8, 8, 9}, {8, 9, 9}, {9, 9, 9}};
996 REQUIRE(c0.x() == std::get<0>(expectedUpperTriples[
count]));
997 REQUIRE(
c1.x() == std::get<1>(expectedUpperTriples[
count]));
998 REQUIRE(
c2.x() == std::get<2>(expectedUpperTriples[
count]));
1001 REQUIRE(
count == expectedUpperTriples.size());
1003 std::vector<std::tuple<int32_t, int32_t, int32_t, int32_t, int32_t>> expectedUpperFives{{0, 0, 0, 0, 0}, {0, 0, 0, 0, 4}, {0, 0, 0, 0, 7}, {0, 0, 0, 4, 4}, {0, 0, 0, 4, 7}, {0, 0, 0, 7, 7}, {0, 0, 4, 4, 4}, {0, 0, 4, 4, 7}, {0, 0, 4, 7, 7}, {0, 0, 7, 7, 7}, {0, 4, 4, 4, 4}, {0, 4, 4, 4, 7}, {0, 4, 4, 7, 7}, {0, 4, 7, 7, 7}, {0, 7, 7, 7, 7}, {4, 4, 4, 4, 4}, {4, 4, 4, 4, 7}, {4, 4, 4, 7, 7}, {4, 4, 7, 7, 7}, {4, 7, 7, 7, 7}, {7, 7, 7, 7, 7}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 6}, {1, 1, 1, 6, 6}, {1, 1, 6, 6, 6}, {1, 6, 6, 6, 6}, {6, 6, 6, 6, 6}, {3, 3, 3, 3, 3}, {3, 3, 3, 3, 5}, {3, 3, 3, 5, 5}, {3, 3, 5, 5, 5}, {3, 5, 5, 5, 5}, {5, 5, 5, 5, 5}, {2, 2, 2, 2, 2}, {2, 2, 2, 2, 8}, {2, 2, 2, 2, 9}, {2, 2, 2, 8, 8}, {2, 2, 2, 8, 9}, {2, 2, 2, 9, 9}, {2, 2, 8, 8, 8}, {2, 2, 8, 8, 9}, {2, 2, 8, 9, 9}, {2, 2, 9, 9, 9}, {2, 8, 8, 8, 8}, {2, 8, 8, 8, 9}, {2, 8, 8, 9, 9}, {2, 8, 9, 9, 9}, {2, 9, 9, 9, 9}, {8, 8, 8, 8, 8}, {8, 8, 8, 8, 9}, {8, 8, 8, 9, 9}, {8, 8, 9, 9, 9}, {8, 9, 9, 9, 9}, {9, 9, 9, 9, 9}};
1005 for (
auto& [c0,
c1,
c2, c3, c4] :
combinations(
CombinationsBlockUpperIndexPolicy(pairBinning, 2, -1, testA, testA, testA, testA, testA))) {
1006 REQUIRE(c0.x() == std::get<0>(expectedUpperFives[
count]));
1007 REQUIRE(
c1.x() == std::get<1>(expectedUpperFives[
count]));
1008 REQUIRE(
c2.x() == std::get<2>(expectedUpperFives[
count]));
1009 REQUIRE(c3.x() == std::get<3>(expectedUpperFives[
count]));
1010 REQUIRE(c4.x() == std::get<4>(expectedUpperFives[
count]));
1013 REQUIRE(
count == expectedUpperFives.size());
1015 std::vector<std::tuple<int32_t, int32_t>> expectedStrictlyUpperPairsSmaller{
1016 {0, 4}, {4, 7}, {1, 6}, {3, 5}, {2, 8}, {8, 9}};
1019 REQUIRE(c0.x() == std::get<0>(expectedStrictlyUpperPairsSmaller[
count]));
1020 REQUIRE(
c1.x() == std::get<1>(expectedStrictlyUpperPairsSmaller[
count]));
1023 REQUIRE(
count == expectedStrictlyUpperPairsSmaller.size());
1025 std::vector<std::tuple<int32_t, int32_t>> expectedStrictlyUpperPairs{
1026 {0, 4}, {0, 7}, {4, 7}, {1, 6}, {3, 5}, {2, 8}, {2, 9}, {8, 9}};
1029 REQUIRE(c0.x() == std::get<0>(expectedStrictlyUpperPairs[
count]));
1030 REQUIRE(
c1.x() == std::get<1>(expectedStrictlyUpperPairs[
count]));
1033 REQUIRE(
count == expectedStrictlyUpperPairs.size());
1035 std::vector<std::tuple<int32_t, int32_t, int32_t>> expectedStrictlyUpperTriples{
1036 {0, 4, 7}, {2, 8, 9}};
1039 REQUIRE(c0.x() == std::get<0>(expectedStrictlyUpperTriples[
count]));
1040 REQUIRE(
c1.x() == std::get<1>(expectedStrictlyUpperTriples[
count]));
1041 REQUIRE(
c2.x() == std::get<2>(expectedStrictlyUpperTriples[
count]));
1044 REQUIRE(
count == expectedStrictlyUpperTriples.size());
1047 for (
auto& [c0,
c1,
c2, c3, c4] :
combinations(
CombinationsBlockStrictlyUpperSameIndexPolicy(pairBinning, 1, -1, testA, testA, testA, testA, testA))) {
1050 REQUIRE(
count == 0);
1053 std::vector<std::tuple<int32_t, int32_t>> expectedFullPairsFirstSmaller{
1054 {0, 0}, {0, 4}, {4, 0}, {4, 4}, {4, 7}, {1, 1}, {1, 6}, {3, 3}, {3, 5}, {2, 2}, {2, 8}};
1057 REQUIRE(
x0.x() == std::get<0>(expectedFullPairsFirstSmaller[
count]));
1058 REQUIRE(
x1.x() == std::get<1>(expectedFullPairsFirstSmaller[
count]));
1061 REQUIRE(
count == expectedFullPairsFirstSmaller.size());
1064 std::vector<std::tuple<int32_t, int32_t>> expectedFullPairsSecondSmaller{
1065 {0, 0}, {0, 4}, {4, 0}, {4, 4}, {7, 4}, {1, 1}, {6, 1}, {3, 3}, {5, 3}, {2, 2}, {8, 2}};
1067 REQUIRE(
x0.x() == std::get<0>(expectedFullPairsSecondSmaller[
count]));
1068 REQUIRE(
x1.x() == std::get<1>(expectedFullPairsSecondSmaller[
count]));
1071 REQUIRE(
count == expectedFullPairsSecondSmaller.size());
1073 std::vector<std::tuple<int32_t, int32_t>> expectedUpperPairsFirstSmaller{
1074 {0, 0}, {0, 4}, {4, 4}, {4, 7}, {1, 1}, {1, 6}, {3, 3}, {3, 5}, {2, 2}, {2, 8}};
1077 REQUIRE(
x0.x() == std::get<0>(expectedUpperPairsFirstSmaller[
count]));
1078 REQUIRE(
x1.x() == std::get<1>(expectedUpperPairsFirstSmaller[
count]));
1081 REQUIRE(
count == expectedUpperPairsFirstSmaller.size());
1084 std::vector<std::tuple<int32_t, int32_t>> expectedUpperPairsSecondSmaller{
1085 {0, 0}, {0, 4}, {4, 4}, {1, 1}, {3, 3}, {2, 2}};
1087 REQUIRE(
x0.x() == std::get<0>(expectedUpperPairsSecondSmaller[
count]));
1088 REQUIRE(
x1.x() == std::get<1>(expectedUpperPairsSecondSmaller[
count]));
1091 REQUIRE(
count == expectedUpperPairsSecondSmaller.size());
1096 REQUIRE(c0.x() == std::get<0>(expectedFullPairs[
count]));
1097 REQUIRE(
c1.x() == std::get<1>(expectedFullPairs[
count]));
1100 REQUIRE(
count == expectedFullPairs.size());
1104 REQUIRE(c0.x() == std::get<0>(expectedFullTriples[
count]));
1105 REQUIRE(
c1.x() == std::get<1>(expectedFullTriples[
count]));
1106 REQUIRE(
c2.x() == std::get<2>(expectedFullTriples[
count]));
1109 REQUIRE(
count == expectedFullTriples.size());
1113 REQUIRE(c0.x() == std::get<0>(expectedUpperPairs[
count]));
1114 REQUIRE(
c1.x() == std::get<1>(expectedUpperPairs[
count]));
1117 REQUIRE(
count == expectedUpperPairs.size());
1121 REQUIRE(c0.x() == std::get<0>(expectedUpperTriples[
count]));
1122 REQUIRE(
c1.x() == std::get<1>(expectedUpperTriples[
count]));
1123 REQUIRE(
c2.x() == std::get<2>(expectedUpperTriples[
count]));
1126 REQUIRE(
count == expectedUpperTriples.size());
1129 for (
auto& [c0,
c1,
c2, c3, c4] :
combinations(
CombinationsBlockUpperSameIndexPolicy(pairBinning, 2, -1, testA, testA, testA, testA, testA))) {
1130 REQUIRE(c0.x() == std::get<0>(expectedUpperFives[
count]));
1131 REQUIRE(
c1.x() == std::get<1>(expectedUpperFives[
count]));
1132 REQUIRE(
c2.x() == std::get<2>(expectedUpperFives[
count]));
1133 REQUIRE(c3.x() == std::get<3>(expectedUpperFives[
count]));
1134 REQUIRE(c4.x() == std::get<4>(expectedUpperFives[
count]));
1137 REQUIRE(
count == expectedUpperFives.size());
1141 REQUIRE(c0.x() == std::get<0>(expectedStrictlyUpperPairs[
count]));
1142 REQUIRE(
c1.x() == std::get<1>(expectedStrictlyUpperPairs[
count]));
1145 REQUIRE(
count == expectedStrictlyUpperPairs.size());
1149 REQUIRE(c0.x() == std::get<0>(expectedStrictlyUpperTriples[
count]));
1150 REQUIRE(
c1.x() == std::get<1>(expectedStrictlyUpperTriples[
count]));
1151 REQUIRE(
c2.x() == std::get<2>(expectedStrictlyUpperTriples[
count]));
1154 REQUIRE(
count == expectedStrictlyUpperTriples.size());
1157 for (
auto& [c0,
c1,
c2, c3, c4] :
selfCombinations(pairBinning, 2, -1, testA, testA, testA, testA, testA)) {
1160 REQUIRE(
count == 0);
1171 std::vector<std::tuple<int32_t, int32_t>> expectedFullPairsTripleBinningNoOverflows{
1172 {0, 0}, {0, 4}, {4, 0}, {4, 4}, {7, 7}, {1, 1}, {1, 6}, {6, 1}, {6, 6}};
1175 REQUIRE(c0.x() == std::get<0>(expectedFullPairsTripleBinningNoOverflows[
count]));
1176 REQUIRE(
c1.x() == std::get<1>(expectedFullPairsTripleBinningNoOverflows[
count]));
1179 REQUIRE(
count == expectedFullPairsTripleBinningNoOverflows.size());
1181 std::vector<std::tuple<int32_t, int32_t>> expectedFullPairsTripleBinning{
1182 {0, 0}, {0, 4}, {4, 0}, {4, 4}, {7, 7}, {1, 1}, {1, 6}, {6, 1}, {6, 6}, {3, 3}, {3, 5}, {5, 3}, {5, 5}, {2, 2}, {8, 8}, {8, 9}, {9, 8}, {9, 9}};
1185 REQUIRE(c0.x() == std::get<0>(expectedFullPairsTripleBinning[
count]));
1186 REQUIRE(
c1.x() == std::get<1>(expectedFullPairsTripleBinning[
count]));
1189 REQUIRE(
count == expectedFullPairsTripleBinning.size());