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

◆ operator<()

bool BIBasis::MonomDL::operator< ( const MonomDL & anotherMonom) const
inline

Definition at line 430 of file monomDL.hpp.

431 {
432 if (TotalDegree < anotherMonom.TotalDegree)
433 {
434 return true;
435 }
436 else if (TotalDegree > anotherMonom.TotalDegree)
437 {
438 return false;
439 }
440 else
441 {
442 VarsListNode *iterator(ListHead),
443 *anotherIterator(anotherMonom.ListHead);
444 while (anotherIterator)
445 {
446 if (iterator->Value < anotherIterator->Value)
447 {
448 return false;
449 }
450 if (iterator->Value > anotherIterator->Value)
451 {
452 return true;
453 }
454 iterator = iterator->Next;
455 anotherIterator = anotherIterator->Next;
456 }
457 return false;
458 }
459 }
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, MonomDL(), BIBasis::Monom::VarsListNode::Next, operator<(), BIBasis::Monom::TotalDegree, and BIBasis::Monom::VarsListNode::Value.

Referenced by operator<().