1
0

Introduce complex solvers

This commit is contained in:
David Allemang
2021-11-12 15:06:29 -05:00
parent fa13493569
commit bdecf40345
10 changed files with 363 additions and 23 deletions

View File

@@ -33,6 +33,7 @@ namespace tc {
}
[[nodiscard]] size_t order() const {
if (!_rank) return 0;
return data.size() / _rank;
}
@@ -60,7 +61,7 @@ namespace tc {
}
template<class T, class F>
std::vector<T> walk(const T &start, const F &op) {
std::vector<T> walk(const T &start, const F &op) const {
std::vector<T> res;
res.reserve(order());
res.push_back(start);
@@ -74,7 +75,7 @@ namespace tc {
}
template<class T, class E, class F>
std::vector<T> walk(const T &start, const E &gens, const F &op) {
std::vector<T> walk(const T &start, const E &gens, const F &op) const {
return walk(start, [&](const T &s, const int g) {
return op(s, gens[g]);
});