CGAL 5.1 - Polynomial
PolynomialTraits_d::Degree Class Reference

#include <Concepts/PolynomialTraits_d--Degree.h>

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}\). More...
 
result_type operator() (argument_type p, int i)
 Computes the degree of \( p\) with respect to variable \( x_i\). More...
 

Member Typedef Documentation

◆ argument_type

typedef PolynomialTraits_d::Polynomial_d PolynomialTraits_d::Degree::argument_type

◆ result_type

typedef int PolynomialTraits_d::Degree::result_type

Member Function Documentation

◆ operator()() [1/2]

result_type PolynomialTraits_d::Degree::operator() ( argument_type  p)

Computes the degree of \( p\) with respect to the outermost variable \( x_{d-1}\).

◆ operator()() [2/2]

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