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

◆ create()

M2FreeAlgebraQuotient * M2FreeAlgebraQuotient::create ( const M2FreeAlgebra & F,
const Matrix * GB,
int maxdeg )
static

Definition at line 28 of file M2FreeAlgebraQuotient.cpp.

33{
34 auto gbElements = copyMatrixToVector(F, GB);
35 auto A = std::unique_ptr<FreeAlgebraQuotient> (new FreeAlgebraQuotient(F.freeAlgebra(), gbElements, maxdeg));
37 result->initialize_ring(F.coefficientRing()->characteristic(), F.degreeRing(), {});
38 result->zeroV = result->from_long(0);
39 result->oneV = result->from_long(1);
40 result->minus_oneV = result->from_long(-1);
41
42 return result;
43}
ConstPolyList copyMatrixToVector(const M2FreeAlgebra &F, const Matrix *input)
const FreeAlgebra & freeAlgebra() const
const Ring * coefficientRing() const
const PolynomialRing * degreeRing() const
M2FreeAlgebraQuotient(const M2FreeAlgebra &F, std::unique_ptr< FreeAlgebraQuotient > A)
long characteristic() const
Definition ring.hpp:159
VALGRIND_MAKE_MEM_DEFINED & result(result)

References Ring::characteristic(), M2FreeAlgebra::coefficientRing(), copyMatrixToVector(), M2FreeAlgebra::degreeRing(), M2FreeAlgebra::freeAlgebra(), M2FreeAlgebraQuotient(), Matrix, and result().

Referenced by IM2_Ring_quotient(), and rawRingM2FreeAlgebraQuotient().