|
Macaulay2 Engine
|
Visitor base class that walks every term of a TowerPolynomial, calling viewTerm(coeff, exponents) once per leaf. More...
#include <dpoly.hpp>
Public Member Functions | |
| DPolyTraverser (const DRing *D0) | |
| virtual | ~DPolyTraverser () |
| void | traverse (const TowerPolynomial f) |
Protected Member Functions | |
| virtual bool | viewTerm (long coeff, const_exponents exp)=0 |
Private Member Functions | |
| bool | traverse1 (int level, const TowerPolynomial g, exponents_t exp) |
Private Attributes | |
| const DPoly * | D |
Additional Inherited Members | |
| Static Public Member Functions inherited from our_new_delete | |
| static void * | operator new (size_t size) |
| static void * | operator new[] (size_t size) |
| static void | operator delete (void *obj) |
| static void | operator delete[] (void *obj) |
| static void * | operator new (size_t size, void *existing_memory) |
| static void * | operator new[] (size_t size, void *existing_memory) |
| static void | operator delete (void *obj, void *existing_memory) |
| static void | operator delete[] (void *obj, void *existing_memory) |
Visitor base class that walks every term of a TowerPolynomial, calling viewTerm(coeff, exponents) once per leaf.
Subclasses override viewTerm to consume terms (e.g. to convert a tower polynomial to engine Nterms for display or for matrix construction). traverse(f) does the depth-first descent and stops as soon as viewTerm returns false. Holds a const DPoly* so the same traverser can be used against several polynomials in the same ring without rebuilding.