\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.11.2 - Polynomial
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
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

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\).