Skip to content

Commit fdec466

Browse files
committed
Added separateByPermutations for multiple lines table entries
1 parent 6472774 commit fdec466

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/VeldkampLinesUtility.hpp

+20
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ namespace segre{
2222
const VeldkampLineTableEntryWithLines<Dimension, NbrPointsPerLine>& lines_table_entry,
2323
const std::vector<std::vector<unsigned int>>& hyp_permutations_table
2424
);
25+
26+
template<size_t Dimension, size_t NbrPointsPerLine, size_t NbrPoints = math::pow(NbrPointsPerLine, Dimension)>
27+
std::vector<VeldkampLineTableEntry> separateByPermutations(
28+
const std::vector<VeldkampLineTableEntryWithLines<Dimension, NbrPointsPerLine>>& lin_table_with_lines,
29+
const std::vector<std::vector<unsigned int>>& hyp_permutations_table
30+
);
2531
}
2632

2733
// Implementations
@@ -75,6 +81,20 @@ namespace segre {
7581

7682
return output_table;
7783
}
84+
85+
template<size_t Dimension, size_t NbrPointsPerLine, size_t NbrPoints = math::pow(NbrPointsPerLine, Dimension)>
86+
std::vector<VeldkampLineTableEntry> separateByPermutations(
87+
const std::vector<VeldkampLineTableEntryWithLines<Dimension, NbrPointsPerLine>>& lin_table_with_lines,
88+
const std::vector<std::vector<unsigned int>>& hyp_permutations_table
89+
){
90+
std::vector<VeldkampLineTableEntry> output_table;
91+
for(const VeldkampLineTableEntryWithLines<Dimension, NbrPointsPerLine>& lines_table_entry : lin_table_with_lines){
92+
for(VeldkampLineTableEntry& entry : separateByPermutations<Dimension, NbrPointsPerLine>(lines_table_entry, hyp_permutations_table)){
93+
output_table.push_back(std::move(entry));
94+
}
95+
}
96+
return output_table;
97+
}
7898
}
7999

80100

0 commit comments

Comments
 (0)