mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 12:02:47 -05:00
modified coxeter notation parsing
This commit is contained in:
@@ -10,7 +10,5 @@
|
||||
#include "group.hpp"
|
||||
|
||||
namespace tc {
|
||||
constexpr Coset UNBOUNDED = (Coset) (-1);
|
||||
|
||||
Cosets solve(const Group &group, const std::vector<Gen> &sub_gens, const Coset &bound = UNBOUNDED);
|
||||
}
|
||||
|
||||
@@ -2,17 +2,9 @@
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "cosets.hpp"
|
||||
#include "util.hpp"
|
||||
|
||||
namespace tc {
|
||||
using Coset = uint32_t;
|
||||
using Gen = uint8_t;
|
||||
using Mult = uint16_t;
|
||||
constexpr Mult FREE = Mult(-1);
|
||||
constexpr Coset UNSET = Coset(-1);
|
||||
|
||||
using Rel = std::tuple<Gen, Gen, Mult>;
|
||||
|
||||
struct Cosets {
|
||||
Gen ngens;
|
||||
std::vector<int> data;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
|
||||
#include <tc/util.hpp>
|
||||
#include <tc/pair_map.hpp>
|
||||
#include <cassert>
|
||||
|
||||
namespace tc {
|
||||
struct Group;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "core.hpp"
|
||||
#include <vector>
|
||||
|
||||
#include <tc/group.hpp>
|
||||
|
||||
namespace tc {
|
||||
/**
|
||||
@@ -10,55 +11,13 @@ namespace tc {
|
||||
*/
|
||||
Group schlafli(const std::vector<int> &mults);
|
||||
|
||||
namespace group {
|
||||
/**
|
||||
* Simplex
|
||||
*/
|
||||
Group A(int dim);
|
||||
Group coxeter(const std::string &symbol);
|
||||
|
||||
/**
|
||||
* Cube, Orthoplex
|
||||
*/
|
||||
Group B(int dim);
|
||||
Group vcoxeter(const std::string &symbol, std::vector<int> &values);
|
||||
|
||||
/**
|
||||
* Demicube, Orthoplex
|
||||
*/
|
||||
Group D(int dim);
|
||||
|
||||
/**
|
||||
* E groups
|
||||
*/
|
||||
Group E(int dim);
|
||||
|
||||
/**
|
||||
* 24 Cell
|
||||
*/
|
||||
Group F4();
|
||||
|
||||
/**
|
||||
* Hexagon
|
||||
*/
|
||||
Group G2();
|
||||
|
||||
/**
|
||||
* Icosahedron
|
||||
*/
|
||||
Group H(int dim);
|
||||
|
||||
/**
|
||||
* Polygonal
|
||||
*/
|
||||
Group I2(int n);
|
||||
|
||||
/**
|
||||
* Toroidal. I2(n) * I2(m)
|
||||
*/
|
||||
Group T(int n, int m);
|
||||
|
||||
/**
|
||||
* Toroidal. T(n, n)
|
||||
*/
|
||||
Group T(int n);
|
||||
template<typename ...Args>
|
||||
Group coxeter(const std::string &symbol, const Args &... args) {
|
||||
std::vector<int> values = {{args...}};
|
||||
return vcoxeter(symbol, values);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,17 @@
|
||||
#include <functional>
|
||||
|
||||
namespace tc {
|
||||
using Gen = uint8_t;
|
||||
using Mult = uint16_t;
|
||||
|
||||
constexpr Mult FREE = Mult(-1);
|
||||
|
||||
using Coset = uint32_t;
|
||||
constexpr Coset UNSET = Coset(-1);
|
||||
constexpr Coset UNBOUNDED = (Coset) (-1);
|
||||
|
||||
using Rel = std::tuple<Gen, Gen, Mult>;
|
||||
|
||||
struct Action {
|
||||
int from_idx = -1;
|
||||
int gen = -1;
|
||||
|
||||
Reference in New Issue
Block a user