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

◆ normalize()

bool binomial_ring::normalize ( binomial & f) const

Definition at line 382 of file gb-toric.cpp.

385{
386 int cmp = compare(f.lead, f.tail);
387 if (cmp == EQ) return false;
388 if (cmp == LT)
389 {
390 monomial a = f.lead;
391 f.lead = f.tail;
392 f.tail = a;
393 }
394 return true;
395}
int compare(monomial0 m, monomial0 n) const
Definition gb-toric.cpp:223
#define monomial
Definition gb-toric.cpp:11
monomial0 tail
Definition gb-toric.hpp:52
monomial0 lead
Definition gb-toric.hpp:51
const int EQ
Definition style.hpp:40
const int LT
Definition style.hpp:39

References compare(), EQ, LT, and monomial.

Referenced by calc_s_pair(), intvector_to_binomial(), one_reduction_step(), and vector_to_binomial().