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

◆ IsPommaretDivisibleBy()

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

Definition at line 545 of file monomDL.hpp.

546 {
547 if (TotalDegree < anotherMonom.TotalDegree)
548 {
549 return false;
550 }
551 if (!anotherMonom.TotalDegree)
552 {
553 return true;
554 }
555
556 VarsListNode *iterator = ListHead,
557 *anotherIterator = anotherMonom.ListHead;
558 while (iterator && anotherIterator)
559 {
560 if (iterator->Value != anotherIterator->Value)
561 {
562 break;
563 }
564 iterator = iterator->Next;
565 anotherIterator = anotherIterator->Next;
566 }
567
568 return !anotherIterator;
569 }
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 IsPommaretDivisibleBy(), BIBasis::Monom::ListHead, MonomDL(), BIBasis::Monom::VarsListNode::Next, BIBasis::Monom::TotalDegree, and BIBasis::Monom::VarsListNode::Value.

Referenced by IsPommaretDivisibleBy().