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

◆ operator>()

bool BIBasis::MonomDRL::operator> ( const MonomDRL & anotherMonom) const
inline

Definition at line 461 of file monomDRL.hpp.

462 {
463 if (TotalDegree < anotherMonom.TotalDegree)
464 {
465 return false;
466 }
467 else if (TotalDegree > anotherMonom.TotalDegree)
468 {
469 return true;
470 }
471 else
472 {
473 VarsListNode *iterator = ListHead,
474 *anotherIterator = anotherMonom.ListHead;
475 while (anotherIterator)
476 {
477 if (iterator->Value < anotherIterator->Value)
478 {
479 return true;
480 }
481 if (iterator->Value > anotherIterator->Value)
482 {
483 return false;
484 }
485 iterator = iterator->Next;
486 anotherIterator = anotherIterator->Next;
487 }
488 return false;
489 }
490 }
Integer TotalDegree
Definition monom.hpp:106
VarsListNode * ListHead
Definition monom.hpp:105
Singly linked-list node of a Monom's variable list, with a per-class slab allocator.
Definition monom.hpp:94

References BIBasis::Monom::ListHead, MonomDRL(), BIBasis::Monom::VarsListNode::Next, operator>(), BIBasis::Monom::TotalDegree, and BIBasis::Monom::VarsListNode::Value.

Referenced by operator>().