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

◆ promote()

bool M2FreeAlgebra::promote ( const Ring * R,
const ring_elem f,
ring_elem & result ) const
virtual

Implements Ring.

Definition at line 130 of file M2FreeAlgebra.cpp.

131{
132 // std::cout << "called promote NC case" << std::endl;
133 // Currently the only case to handle is R = A --> this, and A is the coefficient ring of this.
134 if (R == coefficientRing())
135 {
137 return true;
138 }
139 return false;
140}
virtual ring_elem from_coefficient(const ring_elem a) const
const Ring * coefficientRing() const
VALGRIND_MAKE_MEM_DEFINED & result(result)

References coefficientRing(), from_coefficient(), result(), and Ring::Ring().