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

◆ operator()()

bool montable_sorter_ZZ::operator() ( int x,
int y )
inline

Definition at line 459 of file montableZZ.cpp.

460 {
461 exponents_t xx = exps[x];
462 exponents_t yy = exps[y];
463 for (int i = 0; i < nvars; i++)
464 if (xx[i] < yy[i])
465 return true;
466 else if (xx[i] > yy[i])
467 return false;
468 if (comps[x] < comps[y])
469 return true;
470 else if (comps[x] > comps[y])
471 return false;
472 // Now order them in ascending order on the coeff (which should always be
473 // POSITIVE).
474 return (mpz_cmp(coeffs[x], coeffs[y]) < 0);
475 }
exponents::Exponents exponents_t
volatile int x

References nvars, and x.