From 3aae0b52864e51d814926434db3a68e4d006de56 Mon Sep 17 00:00:00 2001 From: David Allemang Date: Fri, 27 Dec 2019 17:19:40 -0500 Subject: [PATCH] group constructors use "dim" as parameters where appropriate --- include/groups.h | 10 +++++----- src/groups.cpp | 30 +++++++++++++++--------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/groups.h b/include/groups.h index 627f142..78d7a63 100644 --- a/include/groups.h +++ b/include/groups.h @@ -29,19 +29,19 @@ namespace tc { Group schlafli(const std::vector &mults); 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 G2(); - Group H(int n); + Group H(int dim); Group I2(int n); diff --git a/src/groups.cpp b/src/groups.cpp index a438ffd..61663f6 100644 --- a/src/groups.cpp +++ b/src/groups.cpp @@ -74,32 +74,32 @@ namespace tc { } namespace group { - Group A(const int n) { - if (n == 0) + Group A(const int dim) { + if (dim == 0) return Group(0); - return schlafli(std::vector(n - 1, 3)); + return schlafli(std::vector(dim - 1, 3)); } - Group B(const int n) { - std::vector mults(n - 1, 3); + Group B(const int dim) { + std::vector mults(dim - 1, 3); mults[0] = 4; return schlafli(mults); } - Group D(const int n) { - std::vector mults(n - 1, 3); - mults[n - 2] = 2; + Group D(const int dim) { + std::vector mults(dim - 1, 3); + mults[dim - 2] = 2; Group g = schlafli(mults); - g.setmult({1, n - 1, 3}); + g.setmult({1, dim - 1, 3}); return g; } - Group E(const int n) { - std::vector mults(n - 1, 3); - mults[n - 2] = 2; + Group E(const int dim) { + std::vector mults(dim - 1, 3); + mults[dim - 2] = 2; Group g = schlafli(mults); - g.setmult({2, n - 1, 3}); + g.setmult({2, dim - 1, 3}); return g; } @@ -111,8 +111,8 @@ namespace tc { return schlafli({6}); } - Group H(const int n) { - std::vector mults(n - 1, 3); + Group H(const int dim) { + std::vector mults(dim - 1, 3); mults[0] = 5; return schlafli(mults); }