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

◆ IsTrueDivisibleBy()

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

Definition at line 516 of file monomDL.hpp.

517 {
518 if (TotalDegree <= anotherMonom.TotalDegree)
519 {
520 return false;
521 }
522
523 VarsListNode *iterator(ListHead),
524 *anotherIterator(anotherMonom.ListHead);
525 while (iterator && anotherIterator)
526 {
527 if (iterator->Value == anotherIterator->Value)
528 {
529 iterator = iterator->Next;
530 anotherIterator = anotherIterator->Next;
531 }
532 else if (iterator->Value < anotherIterator->Value)
533 {
534 iterator = iterator->Next;
535 }
536 else
537 {
538 break;
539 }
540 }
541
542 return !anotherIterator;
543 }
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, MonomDL(), BIBasis::Monom::VarsListNode::Next, BIBasis::Monom::TotalDegree, and BIBasis::Monom::VarsListNode::Value.

Referenced by IsTrueDivisibleBy().