Macaulay2 Engine
Loading...
Searching...
No Matches

◆ ncBasis()

bool ncBasis ( const FreeAlgebra & A,
const ConstPolyList & gb,
const std::vector< int > & lo_degree,
const std::vector< int > & hi_degree,
int limit,
PolyList & result )

Definition at line 167 of file matrix-ncbasis.cpp.

175{
176 if (A.monoid().degreeMonoid().n_vars() != 1)
177 {
178 ERROR("expected singly graded algebra");
179 return false;
180 }
181 if (lo_degree.size() > 1 or hi_degree.size() > 1)
182 {
183 ERROR("expected singly graded algebra");
184 return false;
185 }
186 NCBasis computation(A, gb, lo_degree, hi_degree, limit);
187 std::swap(result, computation.compute());
188 return true;
189}
const FreeMonoid & monoid() const
const Monoid & degreeMonoid() const
int n_vars() const
Definition monoid.hpp:207
Non-commutative analogue of KBasis: enumerates basis monomials of a FreeAlgebra quotient up to a degr...
void gb(IntermediateBasis &F, int n)
const int ERROR
Definition m2-mem.cpp:55
VALGRIND_MAKE_MEM_DEFINED & result(result)
void swap(mpfr::mpreal &x, mpfr::mpreal &y)
Definition mpreal.h:3244

References NCBasis::compute(), FreeMonoid::degreeMonoid(), ERROR, gb(), FreeAlgebra::monoid(), Monoid::n_vars(), result(), and std::swap().

Referenced by rawNCBasis().