1
0

make 'examples' plural

This commit is contained in:
David Allemang
2021-11-06 18:00:05 -04:00
parent 3e783b03cb
commit 24e7ab47d1
5 changed files with 2 additions and 2 deletions

34
examples/group.cpp Normal file
View File

@@ -0,0 +1,34 @@
#include <iostream>
#include <tc/solver.hpp>
#include <tc/groups.hpp>
int main() {
constexpr unsigned int Rank = 5;
constexpr unsigned int SRank = 3;
tc::Group<Rank> group = tc::schlafli<Rank>({5, 3, 2, 3});
// tc::Group<Rank> group = tc::group::E<Rank>();
tc::SubGroups<Rank, SRank> subs = tc::subgroups<Rank, SRank>(group);
std::cout << "Group " << group.name << " (" << subs.size() << " subgroups)" << std::endl;
std::cout << group << std::endl;
for (const auto &sub: subs) {
for (int i = 0; i < SRank; ++i) {
for (int j = 0; j < SRank; ++j) {
auto sub_mult = sub(i, j);
auto src_mult = group(sub.gens(i), sub.gens(j));
if (sub_mult != src_mult) {
std::cout << "Incorrect subgroup " << sub.name << std::endl;
std::cout << sub << std::endl;
return 1;
}
}
}
}
return 0;
}