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

◆ Reduction()

template<typename MonomType>
void BIBasis::Polynom< MonomType >::Reduction ( const Polynom< MonomType > & anotherPolynom)

Definition at line 539 of file polynom.hpp.

540 {
542 {
547
548 while (iterator)
549 {
550 if (iterator->IsDivisibleBy(anotherLm))
551 {
552 tmpMonom->SetQuotientOf(*iterator, anotherLm);
554 *tmpPolynom *= *tmpMonom;
556 delete tmpPolynom;
558 }
559 else
560 {
561 break;
562 }
563 }
564
565 if (MonomListHead)
566 {
568 iterator = iterator->Next;
569 while (iterator)
570 {
571 if (iterator->IsDivisibleBy(anotherLm))
572 {
573 tmpMonom->SetQuotientOf(*iterator, anotherLm);
575 *tmpPolynom *= *tmpMonom;
577 delete tmpPolynom;
578 iterator = iterator2->Next;
579 }
580 else
581 {
582 iterator2 = iterator2->Next;
583 iterator = iterator2->Next;
584 }
585 }
586 }
587 delete tmpMonom;
588 }
589 }
MonomType * MonomListHead
Definition polynom.hpp:53
void MergeWith(Polynom &anotherPolynom)
Definition polynom.hpp:622
const MonomType & Lm() const
Definition polynom.hpp:189

References Lm(), MergeWith(), MonomListHead, Polynom(), and Reduction().

Referenced by BIBasis::BooleanInvolutiveBasis< MonomType >::Reduce(), and Reduction().