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

◆ operator/=()

const MonomLex & BIBasis::MonomLex::operator/= ( const MonomLex & anotherMonom)
inline

Definition at line 325 of file monomLex.hpp.

326 {
327 VarsListNode **iterator = &ListHead,
328 *anotherIterator = anotherMonom.ListHead;
329
330 while (*iterator && anotherIterator)
331 {
332 if ((*iterator)->Value == anotherIterator->Value)
333 {
334 VarsListNode* nodeToDelete = *iterator;
335 *iterator = (*iterator)->Next;
336 delete nodeToDelete;
337 --TotalDegree;
338 anotherIterator = anotherIterator->Next;
339 }
340 else if ((*iterator)->Value < anotherIterator->Value)
341 {
342 iterator = &((*iterator)->Next);
343 }
344 }
345
346 return *this;
347 }
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 BIBasis::Monom::ListHead, MonomLex(), BIBasis::Monom::VarsListNode::Next, operator/=(), and BIBasis::Monom::TotalDegree.

Referenced by operator/=().