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

◆ IsTrueDivisibleBy()

bool BIBasis::MonomLex::IsTrueDivisibleBy ( const MonomLex & anotherMonom) const
inline

Definition at line 496 of file monomLex.hpp.

497 {
498 if (TotalDegree <= anotherMonom.TotalDegree)
499 {
500 return false;
501 }
502
503 VarsListNode *iterator(ListHead),
504 *anotherIterator(anotherMonom.ListHead);
505 while (iterator && anotherIterator)
506 {
507 if (iterator->Value == anotherIterator->Value)
508 {
509 iterator = iterator->Next;
510 anotherIterator = anotherIterator->Next;
511 }
512 else if (iterator->Value < anotherIterator->Value)
513 {
514 iterator = iterator->Next;
515 }
516 else
517 {
518 break;
519 }
520 }
521
522 return !anotherIterator;
523 }
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 IsTrueDivisibleBy(), BIBasis::Monom::ListHead, MonomLex(), BIBasis::Monom::VarsListNode::Next, BIBasis::Monom::TotalDegree, and BIBasis::Monom::VarsListNode::Value.

Referenced by IsTrueDivisibleBy().