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

◆ IsPommaretDivisibleBy()

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

Definition at line 525 of file monomLex.hpp.

526 {
527 if (TotalDegree < anotherMonom.TotalDegree)
528 {
529 return false;
530 }
531 if (!anotherMonom.TotalDegree)
532 {
533 return true;
534 }
535
536 VarsListNode *iterator = ListHead,
537 *anotherIterator = anotherMonom.ListHead;
538 while (iterator && anotherIterator)
539 {
540 if (iterator->Value != anotherIterator->Value)
541 {
542 break;
543 }
544 iterator = iterator->Next;
545 anotherIterator = anotherIterator->Next;
546 }
547
548 return !anotherIterator;
549 }
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, MonomLex(), BIBasis::Monom::VarsListNode::Next, BIBasis::Monom::TotalDegree, and BIBasis::Monom::VarsListNode::Value.

Referenced by IsPommaretDivisibleBy().