mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2026-01-24 06:39:20 -05:00
COMP: Replace toddcox-faster by reimplemented toddcox
This commit is contained in:
25
tc/src/groups.cpp
Normal file
25
tc/src/groups.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include <tc/groups.hpp>
|
||||
|
||||
#include <fmt/args.h>
|
||||
#include <fmt/core.h>
|
||||
#include <numeric>
|
||||
|
||||
namespace tc {
|
||||
Group<> schlafli(const std::vector<unsigned int> &mults) {
|
||||
Group<> res(mults.size() + 1);
|
||||
for (size_t i = 0; i < mults.size(); ++i) {
|
||||
res.set(i, i + 1, mults[i]);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Group<> vcoxeter(const std::string &symbol, const std::vector<unsigned int> &values) {
|
||||
fmt::dynamic_format_arg_store<fmt::format_context> ds;
|
||||
|
||||
for (const auto &value: values) {
|
||||
ds.push_back(value);
|
||||
}
|
||||
|
||||
return coxeter(fmt::vformat(symbol, ds));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user