|
Macaulay2 Engine
|
BIBasis::PointerLessComparator / PointerMoreComparator — pointer-deref comparators for STL containers. More...
Go to the source code of this file.
Classes | |
| class | BIBasis::PointerLessComparator< T > |
| class | BIBasis::PointerMoreComparator< T > |
Namespaces | |
| namespace | BIBasis |
BIBasis::PointerLessComparator / PointerMoreComparator — pointer-deref comparators for STL containers.
Two tiny templated function objects so a std::sort or std::set over Polynom* / Triple* collections orders by the pointed-to value rather than the raw pointer address. PointerLessComparator forwards to T::operator<; PointerMoreComparator forwards to T::operator> for descending sorts. Both throw a descriptive std::string on a null pointer so the algorithm fails loudly rather than dereferencing junk.
Currently only BooleanInvolutiveBasis::ReduceSet uses PointerMoreComparator to sort the working GBasis list descending by leading monomial before incremental reduction; PointerLessComparator is provided symmetrically for future callers.
Definition in file pcomparator.hpp.