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

◆ degree_weights() [1/2]

template int Monoid::degree_weights< int > ( const_monomial m,
const std::vector< int > & wts ) const

Definition at line 670 of file monoid.cpp.

671{
672 if (mVariableCount == 0) return 0;
673
675 to_expvector(m, EXP1);
676 int sz = (wts.size() < mVariableCount ? wts.size() : mVariableCount);
677 return exponents::weight(sz, EXP1, wts);
678}
exponents::Exponents exponents_t
static Exponent weight(int nvars, ConstExponents a, const std::vector< Exponent > &wts)
void to_expvector(const_monomial m, exponents_t result_exp) const
Definition monoid.cpp:747
size_t exp_size
Definition monoid.hpp:120
const int mVariableCount
number of variables
Definition monoid.hpp:99
#define ALLOCATE_EXPONENTS(byte_len)
Definition monoid.hpp:62

References ALLOCATE_EXPONENTS, exp_size, mVariableCount, to_expvector(), and ExponentVector< int, true >::weight().