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

◆ operator==()

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

Definition at line 386 of file monomLex.hpp.

387 {
388 if (TotalDegree != anotherMonom.TotalDegree)
389 {
390 return false;
391 }
392 else
393 {
394 VarsListNode *iterator(ListHead),
395 *anotherIterator(anotherMonom.ListHead);
396 while (anotherIterator)
397 {
398 if (iterator->Value != anotherIterator->Value)
399 {
400 break;
401 }
402 iterator = iterator->Next;
403 anotherIterator = anotherIterator->Next;
404 }
405 return !anotherIterator;
406 }
407 }
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==(), BIBasis::Monom::TotalDegree, and BIBasis::Monom::VarsListNode::Value.

Referenced by operator==().