CGAL 5.3 - Polynomial
PolynomialTraits_d::Degree Concept Reference

Definition

This AdaptableUnaryFunction computes the degree of a PolynomialTraits_d::Polynomial_d with respect to a certain variable.

The degree of \( p\) with respect to a certain variable \( x_i\), is the highest power \( e\) of \( x_i\) such that the coefficient of \( x_i^{e}\) in \( p\) is not zero.

For instance the degree of \( p = x_0^2x_1^3+x_1^4\) with respect to \( x_1\) is \( 4\).

The degree of the zero polynomial is set to \( 0\). From the mathematical point of view this should be \( -infinity\), but this would imply an inconvenient return type.

Refines:

AdaptableUnaryFunction

CopyConstructible

DefaultConstructible

See also
Polynomial_d
PolynomialTraits_d
PolynomialTraits_d::TotalDegree
PolynomialTraits_d::DegreeVector

Types

typedef int result_type
 
typedef PolynomialTraits_d::Polynomial_d argument_type
 

Operations

result_type operator() (argument_type p)
 Computes the degree of \( p\) with respect to the outermost variable \( x_{d-1}\).
 
result_type operator() (argument_type p, int i)
 Computes the degree of \( p\) with respect to variable \( x_i\). More...
 

Member Function Documentation

◆ operator()()

result_type PolynomialTraits_d::Degree::operator() ( argument_type  p,
int  i 
)

Computes the degree of \( p\) with respect to variable \( x_i\).

Precondition
\( 0 \leq i < d\).