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

◆ IsDivisibleBy()

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

Definition at line 472 of file monomLex.hpp.

473 {
474 VarsListNode *iterator = ListHead,
475 *anotherIterator = anotherMonom.ListHead;
476 while (iterator && anotherIterator)
477 {
478 if (iterator->Value == anotherIterator->Value)
479 {
480 iterator = iterator->Next;
481 anotherIterator = anotherIterator->Next;
482 }
483 else if (iterator->Value < anotherIterator->Value)
484 {
485 iterator = iterator->Next;
486 }
487 else
488 {
489 break;
490 }
491 }
492
493 return !anotherIterator;
494 }
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 IsDivisibleBy(), BIBasis::Monom::ListHead, MonomLex(), BIBasis::Monom::VarsListNode::Next, and BIBasis::Monom::VarsListNode::Value.

Referenced by IsDivisibleBy().