1
0

Build path on-demand, remove Action

Removing the path checks on Cosets::set drastically improves performance.

E7 is now <1s and B8 is now <5s.
This commit is contained in:
David Allemang
2021-11-01 12:34:02 -04:00
parent d36b03b4f9
commit aa3d3b5149
6 changed files with 105 additions and 118 deletions

View File

@@ -12,7 +12,7 @@ void test(const G &group) {
auto e = std::clock();
double diff = (double) (e - s) / CLOCKS_PER_SEC;
int order = cosets.size();
int order = cosets.order();
std::cout
<< std::setw(7) << group.name() << ", "

View File

@@ -4,12 +4,12 @@
#include <iostream>
int main() {
auto cube = tc::group::B(3);
auto cube = tc::group::B<3>();
auto vars = tc::solve(cube);
std::string start;
std::vector<std::string> names = {"a", "b", "c"};
auto words = vars.path.walk(start, names, std::plus<>());
auto words = vars.path().walk(start, names, std::plus<>());
for (const auto &word: words) {
std::cout << (word.empty() ? "-" : word) << std::endl;