Loading [MathJax]/extensions/MathZoom.js
DGtal 2.0.0
DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX > Class Template Reference

#include <DGtal/math/MPolynomial.h>

Inheritance diagram for DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >:
[legend]

Data Structures

class  EvalFun

Public Types

typedef TRing Ring
typedef TOwner Owner
typedef TAlloc Alloc
typedef TX X
typedef MPolynomial< n, Ring, AllocMPolyN
 Type for the multivariate polynomial.
typedef MPolynomial< n - 1, X, typename std::allocator_traits< Alloc >::template rebind_alloc< X > > MPolyNM1

Public Member Functions

 operator X () const
X operator() () const
 operator MPolyNM1 () const

Private Member Functions

 MPolynomialEvaluatorImpl (const Owner &owner, const X &evalpoint)
void evaluate (XX &res, const Fun &evalfun) const

Private Attributes

const OwnermyOwner
 The "owner".
const XmyEvalPoint
 The evaluation point on this level.

Friends

template<int nn, class TT, class AA, class SS>
class MPolynomialEvaluator
template<int nn, class TT, class HLHL, class AA, class SS>
class MPolynomialEvaluatorImpl

Detailed Description

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
class DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >

Description of template class 'MPolynomialEvaluatorImpl'

Specialization of MPolynomialEvaluatorImpl for 1 variable.

This class is a backport from Spielwiese.

Definition at line 102 of file MPolynomial.h.

Member Typedef Documentation

◆ Alloc

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
typedef TAlloc DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >::Alloc

Definition at line 107 of file MPolynomial.h.

◆ MPolyN

typedef MPolynomial< n, Ring, Alloc> DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::MPolyN

Type for the multivariate polynomial.

Definition at line 202 of file MPolynomial.h.

◆ MPolyNM1

typedef MPolynomial< n - 1, X, typename std::allocator_traits<Alloc>::template rebind_alloc<X> > DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::MPolyNM1

Type for the "child" multivariate polynomial, where the first variable X has been substituted by its value. Note that the ring type has been substituted by the type of the variable (i.e. X).

Definition at line 211 of file MPolynomial.h.

◆ Owner

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
typedef TOwner DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >::Owner

Definition at line 106 of file MPolynomial.h.

◆ Ring

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
typedef TRing DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >::Ring

Definition at line 105 of file MPolynomial.h.

◆ X

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
typedef TX DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >::X

Definition at line 108 of file MPolynomial.h.

Constructor & Destructor Documentation

◆ MPolynomialEvaluatorImpl()

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >::MPolynomialEvaluatorImpl ( const Owner & owner,
const X & evalpoint )
inlineprivate

Member Function Documentation

◆ evaluate()

void DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::evaluate ( XX & res,
const Fun & evalfun ) const
inlineprivate

This will be called from a child (i.e. a class of type MPolynomialEvaluatorImpl<n-1, Ring, MPolynomialEvaluator<n,Ring,Owner,Alloc,X>, Alloc, X>) to trigger evaluation.

Definition at line 273 of file MPolynomial.h.

274 {
275 // We have to pass evaluation on to our owner, but give a new
276 // functor which now evaluates polynomials of type poly<n, T>.
277 myOwner.evaluate( res, EvalFun< XX, Fun >( *this, evalfun ) );
278 }

◆ operator MPolyNM1()

DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::operator MPolyNM1 ( ) const
inline

Allows casting to poly<n-1, S>.

Definition at line 321 of file MPolynomial.h.

323 {
324 MPolyNM1 res; // missing: determine allocator object
325 // We need to pass evaluation on to our owner
326 myOwner.evaluate( res, EvalFun2( *this ) );
327 return res;
328 }
MPolynomial< n - 1, X, typename std::allocator_traits< Alloc >::template rebind_alloc< X > > MPolyNM1

◆ operator X()

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >::operator X ( ) const
inline

Cast operator to type X (the explicit type of the variable).

Definition at line 161 of file MPolynomial.h.

References myOwner.

◆ operator()()

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
X DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >::operator() ( ) const
inline

Explicit evaluate. Essentially calls operator S().

Definition at line 171 of file MPolynomial.h.

172 {
173 return (X)(*this);
174 }

◆ MPolynomialEvaluator

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
template<int nn, class TT, class AA, class SS>
friend class MPolynomialEvaluator
friend

Definition at line 111 of file MPolynomial.h.

References MPolynomialEvaluator.

Referenced by MPolynomialEvaluator.

◆ MPolynomialEvaluatorImpl

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
template<int nn, class TT, class HLHL, class AA, class SS>
friend class MPolynomialEvaluatorImpl
friend

Field Documentation

◆ myEvalPoint

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
const X& DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >::myEvalPoint
private

The evaluation point on this level.

Definition at line 118 of file MPolynomial.h.

Referenced by MPolynomialEvaluatorImpl().

◆ myOwner

template<typename TRing, typename TOwner, typename TAlloc, typename TX>
const Owner& DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >::myOwner
private

The "owner".

Definition at line 117 of file MPolynomial.h.

Referenced by MPolynomialEvaluatorImpl(), and operator X().


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