mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 12:02:47 -05:00
restructure cmake project
This commit is contained in:
52
include/groups.h
Normal file
52
include/groups.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace tc {
|
||||
struct Mult {
|
||||
int gen0, gen1, mult;
|
||||
};
|
||||
|
||||
struct Group {
|
||||
int ngens;
|
||||
std::vector<std::vector<int>> _mults;
|
||||
|
||||
explicit Group(int ngens, const std::vector<Mult> &rels = {});
|
||||
|
||||
void setmult(Mult m);
|
||||
|
||||
[[nodiscard]] std::vector<Mult> get_mults() const;
|
||||
|
||||
[[nodiscard]] Group product(const Group &other) const;
|
||||
|
||||
[[nodiscard]] Group power(int p) const;
|
||||
};
|
||||
|
||||
Group operator*(const Group &g, const Group &h);
|
||||
|
||||
Group operator^(const Group &g, const int &p);
|
||||
|
||||
Group schlafli(const std::vector<int> &mults);
|
||||
|
||||
namespace group {
|
||||
Group A(int n);
|
||||
|
||||
Group B(int n);
|
||||
|
||||
Group D(int n);
|
||||
|
||||
Group E(int n);
|
||||
|
||||
Group F4();
|
||||
|
||||
Group G2();
|
||||
|
||||
Group H(int n);
|
||||
|
||||
Group I2(int n);
|
||||
|
||||
Group T(int n, int m);
|
||||
|
||||
Group T(int n);
|
||||
}
|
||||
}
|
||||
37
include/solver.h
Normal file
37
include/solver.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "groups.h"
|
||||
#include <vector>
|
||||
|
||||
namespace tc {
|
||||
struct Cosets {
|
||||
int ngens;
|
||||
std::vector<int> data;
|
||||
int len;
|
||||
|
||||
Cosets(int ngens, const std::vector<int> &data);
|
||||
|
||||
void add_row();
|
||||
|
||||
void put(int coset, int gen, int target);
|
||||
|
||||
void put(int idx, int target);
|
||||
|
||||
[[nodiscard]] int get(int coset, int gen) const;
|
||||
|
||||
[[nodiscard]] int get(int idx) const;
|
||||
};
|
||||
|
||||
struct RelTable {
|
||||
int gens[2]{};
|
||||
int mult;
|
||||
std::vector<int *> lst_ptr;
|
||||
std::vector<int> gen;
|
||||
|
||||
explicit RelTable(Mult m);
|
||||
|
||||
int add_row();
|
||||
};
|
||||
|
||||
Cosets solve(const Group &g, const std::vector<int> &sub_gens = {});
|
||||
}
|
||||
Reference in New Issue
Block a user