Macaulay2 Engine
Loading...
Searching...
No Matches
ColumnsSorter Class Reference

Comparator that orders Macaulay-matrix column indices by the monomial each column represents, using the ambient MonomialInfo. More...

#include <f4-types.hpp>

Public Types

typedef MonomialInfo::value monomial
typedef int value

Public Member Functions

int compare (value a, value b)
bool operator() (value a, value b)
 ColumnsSorter (const MonomialInfo *M0, const coefficient_matrix *mat0)
long ncomparisons () const
long ncomparisons0 () const
void reset_ncomparisons ()
 ~ColumnsSorter ()

Private Attributes

const MonomialInfoM
const coefficient_matrix::column_arraycols

Static Private Attributes

static long ncmps = 0
static long ncmps0 = 0

Detailed Description

Comparator that orders Macaulay-matrix column indices by the monomial each column represents, using the ambient MonomialInfo.

Note
AI-generated documentation. Verify against the source before relying on it.

Fed to std::sort so the F4 matrix builder can put the columns into the monoid's order before reduction. Keeps two static counters (ncmps, ncmps0) to let profiling code report how many comparisons the sort took.

Definition at line 196 of file f4-types.hpp.


The documentation for this class was generated from the following files: