forked from mirror/toddcox-faster
Introduce complex solvers
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
17
examples/complex.cpp
Normal 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;
|
||||
}
|
||||
@@ -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"};
|
||||
|
||||
Reference in New Issue
Block a user