DGtal 1.3.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::EvalFun2 Class Reference

Public Member Functions

 EvalFun2 (const MPolynomialEvaluatorImpl< n, Ring, Owner, Alloc, X > &owner)
 
MPolyNM1 operator() (const MPolyN &p) const
 

Private Attributes

const MPolynomialEvaluatorImpl< n, Ring, Owner, Alloc, X > & myOwner
 

Detailed Description

template<int n, typename TRing, typename TOwner, typename TAlloc, typename TX>
class DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::EvalFun2

Evaluates a polynomial of type poly<n, T> in myEvalPoint; the coefficients of the first indeterminate (which are polynomials of type poly<n-1, Ring>) are casted to poly<n-1, X>, and the result is of type poly<n-1, X> as well.

Definition at line 274 of file MPolynomial.h.

Constructor & Destructor Documentation

◆ EvalFun2()

template<int n, typename TRing , typename TOwner , typename TAlloc , typename TX >
DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::EvalFun2::EvalFun2 ( const MPolynomialEvaluatorImpl< n, Ring, Owner, Alloc, X > &  owner)
inline

Definition at line 280 of file MPolynomial.h.

281 : myOwner(owner)
282 {
283 }
const MPolynomialEvaluatorImpl< n, Ring, Owner, Alloc, X > & myOwner
Definition: MPolynomial.h:276

Member Function Documentation

◆ operator()()

template<int n, typename TRing , typename TOwner , typename TAlloc , typename TX >
MPolyNM1 DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::EvalFun2::operator() ( const MPolyN p) const
inline

Evaluate: the first indeterminate is replaced by myEvalPoint, and the coefficients of the first indeterminate (which are polynomials of type poly<n-1, Ring>) are casted to the type poly<n-1, X>.

Definition at line 291 of file MPolynomial.h.

292 {
293 MPolyNM1 res;
294 X xx = (X) 1;
295 for ( int i = 0; i < (int) p.myValue.size(); ++i )
296 {
297 res += ( (MPolyNM1) p.myValue[i] ) * xx;
298 xx = xx * myOwner.myEvalPoint;
299 }
300 return res;
301 }
MPolynomial< n - 1, X, typename Alloc::template rebind< X >::other > MPolyNM1
Definition: MPolynomial.h:199

Field Documentation

◆ myOwner

template<int n, typename TRing , typename TOwner , typename TAlloc , typename TX >
const MPolynomialEvaluatorImpl<n, Ring, Owner, Alloc, X>& DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::EvalFun2::myOwner
private

Definition at line 276 of file MPolynomial.h.


The documentation for this class was generated from the following file: