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

◆ negate_in_place()

void M2::ARingTower::negate_in_place ( int level,
ARingPolynomial & f ) const
private

Definition at line 358 of file aring-tower.cpp.

359{
360 if (f == nullptr) return;
361 int deg = f->deg;
362 if (level == 0)
363 {
364 for (int i = 0; i <= deg; i++)
365 if (f->coeffs[i] != 0) mBaseRing.negate(f->coeffs[i], f->coeffs[i]);
366 }
367 else
368 {
369 for (int i = 0; i <= deg; i++)
370 if (f->polys[i] != nullptr) negate_in_place(level - 1, f->polys[i]);
371 }
372}
void negate_in_place(int level, ARingPolynomial &f) const
const ARingZZpFFPACK & mBaseRing

References M2::ARingPolynomialStruct::coeffs, M2::ARingPolynomialStruct::deg, mBaseRing, negate_in_place(), and M2::ARingPolynomialStruct::polys.

Referenced by negate(), negate_in_place(), and subtract_in_place().