This class is for dealing with lists of power-products.
This class has been designed to be used by monomial ideal operations, Hilbert, and Mayer-Vietoris trees.
The key functions interpret the list as generators of a monomial ideal: interreduction, divisibility test (ideal membership), lcms (ideal intersection).
The elements are PPWithMask
, to make fast divisibility tests.
Constructor requires a PPMonoid
and a DivMaskRule
(see
DivMask
), so that the user can choose the best suited
implementations (mostly depending on the number of indeterminates and
on the size of the exponents).
ex-PPVector.C
Member fields are
PPMonoid myPPM; DivMaskRule myDMR; std::vector<PPWithMask> myVec;
Functions are
friend PPMonoid PPM(const PPVector& PPs); friend DivMaskRule DMR(const PPVector& PPs); friend void swap(PPVector& PPs1, PPVector& PPs2); friend std::ostream& operator<<(std::ostream&, PPVector); void PushBack(PPVector& PPs, ConstRefPPMonoidElem pp); void PushBackPopBack(PPVector& ToPPs, PPVector& FromPPs); bool IsDivisible(const PPWithMask& pp, const PPVector& ByL); ///< true is pp is divisible by an element of L bool IsDivisible(ConstRefPPMonoidElem pp, const PPVector& ByL); ///< true is pp is divisible by an element of L void interreduce(PPVector& PPs); ///< interreduce PPs (NOT exception clean) void InterreduceSort(PPVector& PPs); ///< interreduce and sort PPs (NOT exception clean) void lcms(PPVector& PPs, const PPVector& PPs1, const PPVector& PPs2); ///< all the lcm between elements of PPs1 and PPs2, effectively the generators of the intersection ideal void convert(std::vector<RingElem>& v, ring P, const PPVector& PPs); ///< converts PP's into RingElem's void swap(PPVector& PPs1, PPVector& PPs2); ///< swap PPs1 and PPs1
There was a tentative to make it an abstract class, PPVectorBase, made
of abstract PPVectorElem, with the plan to have concrete classes a
vector ot PPWithMask
, of [PPMonoidElem], and of square-free pps
(which cannot make a PPMonoid because x*x is not square-free).
But this failed because most operations would need to know the type of the elements in the vector making it more suitable for templates. But
So it was sadly abandoned.