mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 12:02:47 -05:00
add descriptions and stubs for functions we'll need. don't bother with memoizing for now.
This commit is contained in:
@@ -4,35 +4,24 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
size_t key(const std::vector<int> &gens) {
|
/**
|
||||||
size_t bits = 0;
|
* Given elements of a subgroup, find the parent group's names for those same elements.
|
||||||
for (const auto &gen : gens) {
|
*
|
||||||
bits |= 1U << gen;
|
* Raise.
|
||||||
}
|
*/
|
||||||
return bits;
|
void recontext() {}
|
||||||
}
|
|
||||||
|
|
||||||
struct CosetMemo {
|
/**
|
||||||
const tc::Group &parent;
|
* Given some elements of a group and some subgroup, tile those elements according to the cosets of that subgroup
|
||||||
std::vector<std::vector<std::optional<tc::Cosets>>> results;
|
*/
|
||||||
|
void tile() {}
|
||||||
|
|
||||||
explicit CosetMemo(const tc::Group &parent)
|
/**
|
||||||
: parent(parent) {
|
* Given some elements of a group, apply a transformation to all elements.
|
||||||
size_t W = std::pow(2, parent.ngens);
|
*/
|
||||||
|
void translate() {}
|
||||||
|
|
||||||
for (size_t i = 0; i < W; ++i) {
|
/**
|
||||||
results.emplace_back(W, std::nullopt);
|
* Given some group representing an n-dimensional polyhedron, produce (n-1)-simplices that fill the surface of the polyhedron.
|
||||||
}
|
*/
|
||||||
}
|
void triangulate() {}
|
||||||
|
|
||||||
tc::Cosets solve(const std::vector<int> &group_gens, const std::vector<int> &sub_gens) {
|
|
||||||
size_t group_key = key(group_gens);
|
|
||||||
size_t sub_key = key(sub_gens);
|
|
||||||
|
|
||||||
if (!results[group_key][sub_key]) {
|
|
||||||
results[group_key][sub_key] = parent.subgroup(group_gens).solve(sub_gens);
|
|
||||||
}
|
|
||||||
|
|
||||||
return results[group_key][sub_key].value();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user