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

◆ vec_degree_weights()

void Ring::vec_degree_weights ( const FreeModule * F,
const vec f,
const std::vector< int > & wts,
int & lo,
int & hi ) const

Definition at line 858 of file ring-vecs.cpp.

863{
864 vecterm *t = f;
865 if (t == nullptr)
866 {
867 lo = hi = 0;
868 return;
869 }
870 degree_weights(t->coeff, wts, lo, hi);
871 lo += F->primary_degree(t->comp);
872 hi += F->primary_degree(t->comp);
873 for (t = t->next; t != nullptr; t = t->next)
874 {
875 int lo1, hi1;
876 degree_weights(t->coeff, wts, lo1, hi1);
877 lo1 += F->primary_degree(t->comp);
878 hi1 += F->primary_degree(t->comp);
879 if (hi1 > hi) hi = hi1;
880 if (lo1 < lo) lo = lo1;
881 }
882}
int primary_degree(int i) const
Definition freemod.cpp:440
virtual void degree_weights(const ring_elem f, const std::vector< int > &wts, int &lo, int &hi) const
Definition ring.cpp:415
ring_elem coeff
Definition ringelem.hpp:172

References vec::coeff, vec::comp, degree_weights(), vec::next, and FreeModule::primary_degree().

Referenced by vec_homogenize().