mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2026-01-24 06:39:20 -05:00
modified coxeter notation parsing
This commit is contained in:
39
tc/src/langtest.cpp
Normal file
39
tc/src/langtest.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <iostream>
|
||||
|
||||
#include <tc/group.hpp>
|
||||
#include <tc/groups.hpp>
|
||||
|
||||
int main() {
|
||||
std::vector<std::string> symbols = {
|
||||
"5 3 3",
|
||||
"5 (3 3)",
|
||||
"[5 3 3]",
|
||||
"[4 3 [3 5] 3]",
|
||||
"{3 4 5 6 7 8 9}",
|
||||
"3 {3 3 [4] 3} 5",
|
||||
"5 * 3",
|
||||
"5 * [3]",
|
||||
"5 * {2 3}",
|
||||
"5 * [3 2]",
|
||||
"(5 2) * [3 2]",
|
||||
"4 [3 * [2 3]] 5",
|
||||
"{3 * 3} [4] [5]",
|
||||
};
|
||||
|
||||
for (const auto &symbol: symbols) {
|
||||
auto group = tc::coxeter(symbol);
|
||||
|
||||
std::cout << "'" << symbol << "'" << std::endl;
|
||||
|
||||
for (int i = 0; i < group.ngens; ++i) {
|
||||
for (int j = 0; j < group.ngens; ++j) {
|
||||
std::cout << group.get(i, j) << " ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
std::cout << "===========================" << std::endl;
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user