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

◆ degree_weights()

void RingElement::degree_weights ( const std::vector< int > & wts,
int & lo,
int & hi ) const

Definition at line 227 of file relem.cpp.

230{
231 const PolynomialRing *P = R->cast_to_PolynomialRing();
232 if (is_zero())
233 {
234 ERROR("zero element has no degree");
235 return;
236 }
237 if (P == nullptr)
238 {
239 ERROR("expected polynomial ring");
240 return;
241 }
242 P->degree_weights(val, wts, lo, hi);
243}
virtual void degree_weights(const ring_elem f, const std::vector< int > &wts, int &lo, int &hi) const =0
ring_elem val
Definition relem.hpp:69
bool is_zero() const
Definition relem.hpp:167
const Ring * R
Definition relem.hpp:68
const int ERROR
Definition m2-mem.cpp:55

References PolynomialRing::degree_weights(), ERROR, is_zero(), R, and val.

Referenced by rawWeightRange().