CGAL 5.1 - Polynomial
PolynomialTraits_d::Negate Class Reference

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

Definition

This AdaptableUnaryFunction computes \( p(-x)\) for a given polynomial \( p\).

Note that this functor operates on the polynomial in the univariate view, that is, the polynomial is considered as a univariate polynomial in one specific variable.

This functor is provided for efficiency reasons, since this operation just flips the sign of all odd coefficients with respect to the specified variable.

Refines:

AdaptableUnaryFunction

CopyConstructible

DefaultConstructible

See also
Polynomial_d
PolynomialTraits_d

Types

typedef PolynomialTraits_d::Polynomial_d result_type
 
typedef PolynomialTraits_d::Polynomial_d argument_type
 

Operations

result_type operator() (argument_type p)
 Returns \( p(-x)\), with respect to the outermost variable. More...
 
result_type operator() (argument_type p, int i)
 Returns \( p(-x)\), with respect to variable \( x_i\). More...
 

Member Typedef Documentation

◆ argument_type

typedef PolynomialTraits_d::Polynomial_d PolynomialTraits_d::Negate::argument_type

◆ result_type

typedef PolynomialTraits_d::Polynomial_d PolynomialTraits_d::Negate::result_type

Member Function Documentation

◆ operator()() [1/2]

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

Returns \( p(-x)\), with respect to the outermost variable.

◆ operator()() [2/2]

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

Returns \( p(-x)\), with respect to variable \( x_i\).

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