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

◆ vec_degree_of_var()

void Ring::vec_degree_of_var ( int n,
const vec v,
int & lo,
int & hi ) const

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

748{
749 if (v == nullptr)
750 {
751 ERROR("attempting to find degree of zero vector");
752 return;
753 }
754 degree_of_var(n, v->coeff, lo, hi);
755 for (vec w = v->next; w != nullptr; w = w->next)
756 {
757 int lo1, hi1;
758 degree_of_var(n, w->coeff, lo1, hi1);
759 if (lo1 < lo) lo = lo1;
760 if (hi1 > hi) hi = hi1;
761 }
762}
virtual void degree_of_var(int n, const ring_elem a, int &lo, int &hi) const
Definition ring.cpp:368
const int ERROR
Definition m2-mem.cpp:55

References degree_of_var(), and ERROR.

Referenced by Matrix::divide_by_var().