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

◆ down_level()

bool DPoly::down_level ( int newlevel,
int oldlevel,
TowerPolynomial & f )

Definition at line 109 of file dpoly.cpp.

110{
111 if (f == nullptr) return true;
112 for (int i = oldlevel; i > newlevel; i--)
113 {
114 if (f->deg > 0)
115 {
116 dealloc_poly(f);
117 return false;
118 }
119 TowerPolynomial g = f->arr.polys[0];
120 f->arr.polys[0] = nullptr;
121 dealloc_poly(f);
122 f = g;
123 }
124 return true;
125}
static void dealloc_poly(TowerPolynomial &f)
Definition dpoly.cpp:292

References dealloc_poly().

Referenced by initialize().