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

◆ unnecessary1()

bool MonomialInfo::unnecessary1 ( const_packed_monomial m,
const_packed_monomial p1,
const_packed_monomial p2,
const_packed_monomial lcm ) const
inline

Definition at line 574 of file moninfo.hpp.

589 {
590 // TODO: MES: this maybe should check that lead components of m and p1 and
591 // p2 are the same...
593 bool A = false;
594 bool B = false;
595 m += firstvar;
596 p1 += firstvar;
597 p2 += firstvar;
598 lcm += firstvar;
599 for (int i = 0; i < nvars; i++)
600 {
601 if (m[i] > lcm[i]) return false;
602 if (m[i] == lcm[i]) continue;
603 if (!A && p1[i] < lcm[i])
604 {
605 A = true;
606 continue;
607 }
608 if (!B && p2[i] < lcm[i])
609 {
610 B = true;
611 }
612 }
613 return (A && B);
614 }
unsigned long ncalls_unneccesary
Definition moninfo.hpp:143
int p1

References firstvar, ncalls_unneccesary, nvars, and p1.