|
Macaulay2 Engine
|
Strict-weak comparator on integer indices into a std::vector<int*> of monomials, used by the resolution code to sort columns. More...
#include <res-monomial-sorter.hpp>
Public Member Functions | |
| MonomialSorterObject (const Monoid &M, const std::vector< int * > monoms) | |
| bool | operator() (int a, int b) |
| void | resetNumComparisons () |
| long | numComparisons () const |
Private Attributes | |
| const Monoid & | mMonoid |
| const std::vector< int * > | mMonoms |
Static Private Attributes | |
| static long | mNumComparisons = 0 |
Strict-weak comparator on integer indices into a std::vector<int*> of monomials, used by the resolution code to sort columns.
Each mMonoms[i] is laid out as [tiebreaker, basecomp, actual_monomial...]. operator()(a, b) compares the monomial bodies via Monoid::compare, returning the corresponding bool; on EQ it falls back to the tiebreaker slot. The static mNumComparisons counter records how many comparisons the sort performed — handy when profiling a large frame's column-sort cost.
Definition at line 67 of file res-monomial-sorter.hpp.