1
0

Introduce complex solvers

This commit is contained in:
David Allemang
2021-11-12 15:06:29 -05:00
parent fa13493569
commit bdecf40345
10 changed files with 363 additions and 23 deletions

View File

@@ -6,3 +6,6 @@ target_link_libraries(path PRIVATE tc)
add_executable(group group.cpp)
target_link_libraries(group PRIVATE tc)
add_executable(complex complex.cpp)
target_link_libraries(complex PRIVATE tc)

View File

@@ -7,8 +7,11 @@
template<class G>
void test(const G &group) {
tc::Symbol gens(1);
gens << 0;
auto s = std::clock();
auto cosets = tc::solve(group, {0});
auto cosets = tc::solve(group, gens);
auto e = std::clock();
double diff = (double) (e - s) / CLOCKS_PER_SEC;

17
examples/complex.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include <iostream>
#include <tc/complex.hpp>
#include <tc/groups.hpp>
int main() {
tc::Symbol symbol(3);
symbol << 5, 3, 3;
auto group = tc::schlafli(symbol);
constexpr int N = 4;
std::vector<tc::Symbol> combos = tc::combinations(group.gens, N - 1);
auto data = tc::merge<N>(tc::hull<4>(group, combos, {}));
std::cout << data.size() << std::endl;
return 0;
}

View File

@@ -6,8 +6,9 @@
#include <tc/groups.hpp>
int main() {
tc::Symbol gens(0);
auto cube = tc::group::B(3);
auto vars = tc::solve(cube);
auto vars = tc::solve(cube, gens);
std::string start;
std::vector<std::string> names = {"a", "b", "c"};