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

◆ quotient_as_vp()

void MonomialInfo::quotient_as_vp ( const_packed_monomial a,
const_packed_monomial b,
varpower_monomial result,
int & deg_result,
bool & are_disjoint ) const
inline

Definition at line 685 of file moninfo.hpp.

690 {
692 // sets result, deg, are_disjoint
694 are_disjoint = true;
695 a += firstvar;
696 b += firstvar;
697 int len = 0;
698 varpower_word *r = result + 1;
699 for (int i = nvars - 1; i >= 0; --i)
700 {
701 if (a[i] != 0 && b[i] != 0) are_disjoint = false;
702 long c = a[i] - b[i];
703 if (c > 0)
704 {
705 *r++ = i;
706 *r++ = c;
707 deg += c * mHeftDegrees[i];
708 len++;
709 }
710 }
711 result[0] = len;
712 deg_result = static_cast<int>(deg);
713 }
unsigned long ncalls_quotient_as_vp
Definition moninfo.hpp:144
std::vector< int > mHeftDegrees
Definition moninfo.hpp:120
std::vector< int > mModuleHeftDegrees
Definition moninfo.hpp:123
long get_component(const_packed_monomial m) const
Definition moninfo.hpp:185
VALGRIND_MAKE_MEM_DEFINED & result(result)
varpower_monomials::Exponent varpower_word

References firstvar, get_component(), mHeftDegrees, mModuleHeftDegrees, ncalls_quotient_as_vp, nvars, and result().