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

◆ power() [1/2]

void FreeAlgebra::power ( Poly & result,
const Poly & f,
int n ) const

Definition at line 696 of file FreeAlgebra.cpp.

697{
698 from_long(result, 1);
699 Poly tmp;
700 for (int i=0; i<n; i++)
701 {
702 mult(tmp, result, f);
703 result = tmp;
704 setZero(tmp);
705 }
706}
Polynomial< CoefficientRingType > Poly
void from_long(Poly &result, long n) const
void mult(Poly &result, const Poly &f, const Poly &g) const
void setZero(Poly &f) const
VALGRIND_MAKE_MEM_DEFINED & result(result)

References from_long(), mult(), result(), and setZero().

Referenced by power(), M2FreeAlgebra::power(), and M2FreeAlgebra::power().