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

◆ IsDivisibleBy()

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

Definition at line 492 of file monomDL.hpp.

493 {
494 VarsListNode *iterator = ListHead,
495 *anotherIterator = anotherMonom.ListHead;
496 while (iterator && anotherIterator)
497 {
498 if (iterator->Value == anotherIterator->Value)
499 {
500 iterator = iterator->Next;
501 anotherIterator = anotherIterator->Next;
502 }
503 else if (iterator->Value < anotherIterator->Value)
504 {
505 iterator = iterator->Next;
506 }
507 else
508 {
509 break;
510 }
511 }
512
513 return !anotherIterator;
514 }
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, MonomDL(), BIBasis::Monom::VarsListNode::Next, and BIBasis::Monom::VarsListNode::Value.

Referenced by IsDivisibleBy().