group constructors use "dim" as parameters where appropriate

This commit is contained in:
2019-12-27 17:19:40 -05:00
parent 96b27cd642
commit 3aae0b5286
2 changed files with 20 additions and 20 deletions

View File

@@ -29,19 +29,19 @@ namespace tc {
Group schlafli(const std::vector<int> &mults); Group schlafli(const std::vector<int> &mults);
namespace group { namespace group {
Group A(int n); Group A(int dim);
Group B(int n); Group B(int dim);
Group D(int n); Group D(int dim);
Group E(int n); Group E(int dim);
Group F4(); Group F4();
Group G2(); Group G2();
Group H(int n); Group H(int dim);
Group I2(int n); Group I2(int n);

View File

@@ -74,32 +74,32 @@ namespace tc {
} }
namespace group { namespace group {
Group A(const int n) { Group A(const int dim) {
if (n == 0) if (dim == 0)
return Group(0); return Group(0);
return schlafli(std::vector<int>(n - 1, 3)); return schlafli(std::vector<int>(dim - 1, 3));
} }
Group B(const int n) { Group B(const int dim) {
std::vector<int> mults(n - 1, 3); std::vector<int> mults(dim - 1, 3);
mults[0] = 4; mults[0] = 4;
return schlafli(mults); return schlafli(mults);
} }
Group D(const int n) { Group D(const int dim) {
std::vector<int> mults(n - 1, 3); std::vector<int> mults(dim - 1, 3);
mults[n - 2] = 2; mults[dim - 2] = 2;
Group g = schlafli(mults); Group g = schlafli(mults);
g.setmult({1, n - 1, 3}); g.setmult({1, dim - 1, 3});
return g; return g;
} }
Group E(const int n) { Group E(const int dim) {
std::vector<int> mults(n - 1, 3); std::vector<int> mults(dim - 1, 3);
mults[n - 2] = 2; mults[dim - 2] = 2;
Group g = schlafli(mults); Group g = schlafli(mults);
g.setmult({2, n - 1, 3}); g.setmult({2, dim - 1, 3});
return g; return g;
} }
@@ -111,8 +111,8 @@ namespace tc {
return schlafli({6}); return schlafli({6});
} }
Group H(const int n) { Group H(const int dim) {
std::vector<int> mults(n - 1, 3); std::vector<int> mults(dim - 1, 3);
mults[0] = 5; mults[0] = 5;
return schlafli(mults); return schlafli(mults);
} }