17 std::unique_ptr<WordTable> W {
new WordTable };
85 const std::vector<int>& lo_degree,
86 const std::vector<int>& hi_degree,
101 for (
auto i = 0; i <
mMonoid.numVars(); ++i)
104 if (lo_degree.size() > 0)
mLoHeft = lo_degree[0];
105 if (hi_degree.size() > 0)
mHiHeft = hi_degree[0];
143 if (
mWordTable->isSuffix(tmpWord,notUsed))
return;
170 const std::vector<int>& lo_degree,
171 const std::vector<int>& hi_degree,
178 ERROR(
"expected singly graded algebra");
181 if (lo_degree.size() > 1 or hi_degree.size() > 1)
183 ERROR(
"expected singly graded algebra");
186 NCBasis computation(A,
gb, lo_degree, hi_degree, limit);
Free associative algebra k<x_1,...,x_n> over an arbitrary coefficient ring.
FreeMonoid — monoid of length-prefixed non-commutative words with weight-vector prefix.
gc_vector< const Poly * > ConstPolyList
Polynomial< CoefficientRingType > Poly
gc_vector< Poly * > PolyList
Word and WordWithData — non-owning views over the flat-int encoding of a non-commutative word.
WordTable / WordWithDataTable — leading-word indices for non-commutative Gröbner basis lookup.
const FreeMonoid & monoid() const
Free associative algebra over a coefficient ring: the non-commutative analogue of PolynomialRing.
const Monoid & degreeMonoid() const
void wordFromMonom(Word &result, const Monom &m) const
The free non-commutative monoid on a set of named variables, with monomial ordering and degree / weig...
const FreeMonoid & mMonoid
const FreeAlgebra & mFreeAlgebra
std::vector< int > mMonomial
std::vector< int > mVariables
std::vector< int > mVariableHefts
NCBasis(const FreeAlgebra &A, const ConstPolyList &gb, const std::vector< int > &lo_degree, const std::vector< int > &hi_degree, int limit)
std::unique_ptr< WordTable > mWordTable
Non-commutative analogue of KBasis: enumerates basis monomials of a FreeAlgebra quotient up to a degr...
Non-owning view of a non-commutative word: [begin, end) of int variable indices.
Index of Words (non-commutative monomials) with subword, prefix/suffix, and overlap lookup used by th...
void gb(IntermediateBasis &F, int n)
bool ncBasis(const FreeAlgebra &A, const ConstPolyList &gb, const std::vector< int > &lo_degree, const std::vector< int > &hi_degree, int limit, PolyList &result)
bool system_interrupted()
system_interrupted() — thread-safe polling predicate for Ctrl+C handling.
VALGRIND_MAKE_MEM_DEFINED & result(result)
std::unique_ptr< WordTable > constructWordTable(const FreeAlgebra &A, const ConstPolyList &gb)
ncBasis — non-commutative analogue of basis(d, M) over NCAlgebras/FreeAlgebra.
Monoid — variable count, naming, grading, and monomial order of a polynomial ring.
void swap(mpfr::mpreal &x, mpfr::mpreal &y)