mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 12:02:47 -05:00
Replace ComboIterator with std::set<std::vector<int>> via combinations.hpp
Since the number of generators never exceeds 6, the maximum number of combinations is (6, 3) = 20, so the space optimizations of using an iterator is mute. Doing this way also allows to use set_difference and set_union to deal with collections of subgroups. This is not easily possible otherwise.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include <geometry.hpp>
|
||||
#include <utility>
|
||||
|
||||
#include "combo_iterator.hpp"
|
||||
#include <combinations.hpp>
|
||||
|
||||
/**
|
||||
* Produce a list of all generators for the group context. The range [0..group.ngens).
|
||||
@@ -184,7 +184,8 @@ Mesh<N> Mesh<N>::fill(const tc::Group &g, std::vector<int> ctx) {
|
||||
if (ctx.size() + 1 != N)
|
||||
throw std::logic_error("ctx size must be one less than N");
|
||||
|
||||
const auto &combos = Combos(ctx, (int)ctx.size() - 1);
|
||||
// const auto &combos = Combos(ctx, (int)ctx.size() - 1);
|
||||
const auto &combos = combinations(ctx, (int) ctx.size() - 1);
|
||||
|
||||
std::vector<Mesh<N>> meshes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user