File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
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 286 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 292 of file MPolynomial.h.

293 : myOwner(owner)
294 {
295 }
const MPolynomialEvaluatorImpl< n, Ring, Owner, Alloc, X > & myOwner

References DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::MPolynomialEvaluatorImpl, and myOwner.

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 303 of file MPolynomial.h.

304 {
306 X xx = (X) 1;
307 for ( int i = 0; i < (int) p.myValue.size(); ++i )
308 {
309 res += ( (MPolyNM1) p.myValue[i] ) * xx;
310 xx = xx * myOwner.myEvalPoint;
311 }
312 return res;
313 }

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

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