Implement triangulate (like 95% sure it's right) - memoized

Modify recontext to reorient in special cases
Move reorient as Simplexes method
Changes in geomtest and memotest to test triangulate and memoization for triangulate
This commit is contained in:
Jacob
2020-01-25 21:32:17 -05:00
parent 506320200d
commit 6b03b7d9be
5 changed files with 122 additions and 25 deletions

View File

@@ -7,16 +7,22 @@
#include <iostream>
int main () {
auto g = tc::group::B(3);
auto g = tc::schlafli({3,2});
GeomGen gg(g);
Simplexes s(1);
s.vals.push_back(0);
s.vals.push_back(1);
s.vals.push_back(0);
s.vals.push_back(2);
s.vals.push_back(1);
s.vals.push_back(2);
auto path = gg.solve().path;
//std::vector<std::string> = {"a", "b", "c"};
std::string base = "";
auto words = path.walk<std::string, std::string>(base,{"a","b","c"}, [](auto s1, auto g){return s1+g;});
for (const auto word : words) {
std::cout << word << std::endl;
}
std::vector<int> gens = {0,1,2};
auto s = gg.triangulate(gens);
s.print();
return 0;
auto g_gens = gg.group_gens();
std::vector<int> sg_gens = {1,2};