Macaulay2 Engine
Loading...
Searching...
No Matches

◆ compare() [1/3]

int Monoid::compare ( const_monomial m,
const_monomial n ) const
inline

Definition at line 251 of file monoid.hpp.

252 {
253 int i = monomial_size_;
254 if (i == 0) return EQ;
255 while (1)
256 {
257 if (*m > *n) return GT;
258 if (*m < *n) return LT;
259 if (--i == 0) return EQ;
260 m++, n++;
261 }
262 }
int monomial_size_
size of an encoded monomial
Definition monoid.hpp:123
const int EQ
Definition style.hpp:40
const int GT
Definition style.hpp:41
const int LT
Definition style.hpp:39

References EQ, GT, LT, and monomial_size_.