Remove Group::name

This commit is contained in:
David Allemang
2022-09-13 21:34:30 -04:00
parent f606ea3b4b
commit c47c6262c0
5 changed files with 54 additions and 134 deletions

View File

@@ -9,12 +9,11 @@ namespace tc {
struct Group {
int ngens;
std::vector<std::vector<int>> _mults;
std::string name;
Group(const Group &) = default;
explicit Group(int ngens, const std::vector<Rel> &rels = {}, std::string name = "G")
: ngens(ngens), name(std::move(name)) {
explicit Group(int ngens, const std::vector<Rel> &rels = {})
: ngens(ngens) {
_mults.resize(ngens);
for (auto &mult: _mults) {
@@ -47,33 +46,6 @@ namespace tc {
[[nodiscard]] SubGroup subgroup(const std::vector<int> &gens) const;
[[nodiscard]] Group product(const Group &other) const {
std::stringstream ss;
ss << name << "*" << other.name;
Group g(ngens + other.ngens, rels(), ss.str());
for (const auto &rel: other.rels()) {
g.set(rel.shift(ngens));
}
return g;
}
[[nodiscard]] Group power(int p) const {
std::stringstream ss;
ss << name << "^" << p;
Group g(ngens * p, {}, ss.str());
for (const auto &rel: rels()) {
for (int off = 0; off < g.ngens; off += ngens) {
g.set(rel.shift(off));
}
}
return g;
}
[[nodiscard]] Cosets solve(const std::vector<int> &sub_gens = {}) const;
};

View File

@@ -4,12 +4,6 @@
namespace tc {
/**
* Construct a group from a (simplified) Schlafli Symbol of the form [a, b, ..., c]
* @param mults: The sequence of multiplicites between adjacent generators.
*/
Group schlafli(const std::vector<int> &mults, const std::string &name);
/**
* Construct a group from a (simplified) Schlafli Symbol of the form [a, b, ..., c]
* @param mults: The sequence of multiplicites between adjacent generators.