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

◆ gbvector_compare()

int GBRing::gbvector_compare ( const FreeModule * F,
const gbvector * f,
const gbvector * g ) const

Definition at line 413 of file gbring.cpp.

417{
418 int cmp;
419 const SchreyerOrder *S = F->get_schreyer_order();
420
421 if (S)
422 {
425 f->monom, f->comp - 1, g->monom, g->comp - 1);
426 else
427 cmp = S->schreyer_compare(f->monom, f->comp - 1, g->monom, g->comp - 1);
428 }
429 else
430 {
431 // At this point F doesn't have a Schreyer order
432 if (_up_order)
433 cmp = M->compare(f->monom, -f->comp, g->monom, -g->comp);
434 else
435 cmp = M->compare(f->monom, f->comp, g->monom, g->comp);
436 }
437 return cmp;
438}
const SchreyerOrder * get_schreyer_order() const
Definition freemod.hpp:103
bool _schreyer_encoded
Definition gbring.hpp:136
const Monoid * M
Definition gbring.hpp:137
bool _up_order
Definition gbring.hpp:148
int schreyer_compare_encoded(const_monomial m, int m_comp, const_monomial n, int n_comp) const
Definition schorder.cpp:356
int schreyer_compare(const_monomial m, int m_comp, const_monomial n, int n_comp) const
Definition schorder.cpp:337
int monom[1]
Definition gbring.hpp:83
int comp
Definition gbring.hpp:82

References _schreyer_encoded, _up_order, M, SchreyerOrder::schreyer_compare(), and SchreyerOrder::schreyer_compare_encoded().

Referenced by find_coeff(), gbvector_add_to(), and gbvector_add_to_zzp().