degree

Function degree 

Source
pub fn degree(nvars: usize, ncoeffs: usize) -> Option<Power>
Expand description

Returns the degree of a polynomial given the number of variables and coefficients.

This is the inverse of ncoeffs(). If there is no degree for which ncoeffs(nvars, degree) == ncoeffs, this function returns None. For example, a polynomial in two variables has one coefficient for degree zero and three for degree one, but there is nothing in between.

See ncoeffs() for the inverse operation and degree_ncoeffs_iter() for an iterator that yields pairs of degrees and number of coefficients for degree zero and up.