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

◆ Find()

template<typename MonomType>
const MonomType *const * BIBasis::Polynom< MonomType >::Find ( const MonomType & monom) const
private

Definition at line 662 of file polynom.hpp.

663 {
665 {
666 return 0;
667 }
668
670 * const *currentPointer = 0;
671 unsigned long range(Length()), middle;
672
673 while ((middle = range >> 1) > 0)
674 {
676 for (unsigned long i = 0; i < middle; ++i)
677 {
678 currentPointer = &((*currentPointer)->Next);
679 }
680
681 switch ((**currentPointer).Compare(monom))
682 {
683 case 1:
685 range -= middle;
686 break;
687 case -1:
688 range = middle;
689 break;
690 case 0:
691 return currentPointer;
692 }
693 }
694
695 return previousPointer;
696 }
MonomType * MonomListHead
Definition polynom.hpp:53
unsigned long Length() const
Definition polynom.hpp:163

References Find(), Length(), and MonomListHead.

Referenced by Find(), and operator+=().