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

◆ gbvector_weight() [2/2]

int GBWeight::gbvector_weight ( const gbvector * f,
int & lead_term_weight ) const

Definition at line 73 of file gbweight.cpp.

74{
75 /* Return the maximum degree of any term of f */
76
77 if (f == nullptr)
78 {
79 initial_term_weight = 0;
80 return 0;
81 }
82 int deg = gbvector_term_weight(f);
83 initial_term_weight = deg;
84 for (const gbvector *t = f->next; t != nullptr; t = t->next)
85 {
86 int tdeg = gbvector_term_weight(t);
87 if (tdeg > deg) deg = tdeg;
88 }
89
90 return deg;
91}
int gbvector_term_weight(const gbvector *f) const
Definition gbweight.cpp:65
gbvector * next
Definition gbring.hpp:80

References gbvector_term_weight(), and gbvector::next.