mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 12:02:47 -05:00
starting new triangulation technique. verified working with edges.
This commit is contained in:
@@ -7,6 +7,7 @@ namespace tc {
|
||||
struct Action {
|
||||
int coset = -1;
|
||||
int gen = -1;
|
||||
int target = -1;
|
||||
};
|
||||
|
||||
struct Cosets {
|
||||
|
||||
@@ -29,8 +29,6 @@ namespace tc {
|
||||
|
||||
[[nodiscard]] Group power(int p) const;
|
||||
|
||||
[[nodiscard]] Group shrink(const std::vector<int> &gens) const;
|
||||
|
||||
[[nodiscard]] bool trivial() const;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace tc {
|
||||
data[target * ngens + gen] = coset;
|
||||
|
||||
if (path[target].coset == -1) {
|
||||
path[target] = {coset, gen};
|
||||
path[target] = {coset, gen, target};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace tc {
|
||||
data[target * ngens + gen] = coset;
|
||||
|
||||
if (path[target].coset == -1) {
|
||||
path[target] = {coset, gen};
|
||||
path[target] = {coset, gen, target};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,23 +66,6 @@ namespace tc {
|
||||
return g;
|
||||
}
|
||||
|
||||
Group Group::shrink(const std::vector<int> &gens) const {
|
||||
Group g(ngens);
|
||||
for (const auto &i : gens) {
|
||||
for (const auto &j : gens) {
|
||||
g._mults[i][j] = _mults[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
std::stringstream ss;
|
||||
ss << name << "{";
|
||||
for (auto e : gens) ss << " " << e;
|
||||
ss << " }";
|
||||
g.name = ss.str();
|
||||
|
||||
return g;
|
||||
}
|
||||
|
||||
bool Group::trivial() const {
|
||||
for (int i = 0; i < ngens; ++i) {
|
||||
for (int j = 0; j < ngens; ++j) {
|
||||
|
||||
Reference in New Issue
Block a user