CAPD DynSys Library 5.2.0
capd::autodiff::DagIndexer< ScalarT > Class Template Reference

#include <capd/autodiff/DagIndexer.h>

Public Types

typedef ScalarT ScalarType
 
typedef __size_type size_type
 
typedef capd::vectalg::ColumnVector< ScalarType, 0 > RefVectorType
 
typedef ScalarTypeiterator
 
typedef const ScalarTypeconst_iterator
 
typedef capd::diffAlgebra::CnContainer< MultiindexData, 0, 0, 0 > IndexArray
 

Public Member Functions

 DagIndexer (Dim domain=1, Dim image=1, Degree degree=1, size_type nodes=1, Order order=0)
 
 DagIndexer (const DagIndexer &dag)
 
 ~DagIndexer ()
 
DagIndexeroperator= (const DagIndexer &dag)
 
ScalarTypeoperator() (VarNo varNo, CoeffNo coeffNo)
 
ScalarTypeoperator() (VarNo varNo, DerNo derNo, CoeffNo coeffNo)
 
ScalarTypeoperator() (VarNo varNo, DerNo j, DerNo c, CoeffNo coeffNo)
 
ScalarTypeoperator() (VarNo varNo, DerNo i, DerNo j, DerNo c, CoeffNo coeffNo)
 
Dim domainDimension () const
 
Dim imageDimension () const
 
Dim degree () const
 
JetSize jetSize () const
 
JetSize timeJetSize () const
 
template<class Iterator >
void setMask (Iterator b, Iterator e)
 This method defines a mask for computation of partial derivatives of the function represented by the instance. More...
 
const boolgetMask () const
 
bool getMask (size_type j) const
 
bool getMask (size_type j, size_type c) const
 
void addMultiindexToMask (const capd::vectalg::Multiindex &i)
 
void resetMask ()
 
ScalarTypecoefficients ()
 
const ScalarTypecoefficients () const
 
Order getOrder () const
 
void setOrder (Order order)
 
void resize (Dim domain, Dim image, Degree degree, size_type nodes, Order order)
 
size_type numberOfNodes () const
 returns total number of nodes in DAG representing expression More...
 
iterator begin ()
 iterator selection. Returns iterator to the first element in container More...
 
iterator end ()
 iterator selection. Returns iterator to the first element in container More...
 
iterator begin (size_type i)
 iterator selection. Returns iterator to the first coefficient of the i-th component More...
 
iterator end (size_type i)
 iterator selection. Returns iterator to an element after the last element the i-th component More...
 
iterator begin (size_type i, size_type d)
 iterator selection. Returns iterator to the first coefficient of the i-th component of the homogeneous part of degree 'd' More...
 
iterator end (size_type i, size_type d)
 iterator selection. Returns iterator to an element after the last coefficient of the i-th component of the homogeneous part of degree 'd' More...
 
const_iterator begin () const
 iterator selection. Returns iterator to the first element in container More...
 
const_iterator end () const
 iterator selection. Returns iterator to the first element in container More...
 
const_iterator begin (size_type i) const
 iterator selection. Returns iterator to the first coefficient of the i-th component More...
 
const_iterator end (size_type i) const
 iterator selection. Returns iterator to an element after the last element the i-th component More...
 
const_iterator begin (size_type i, size_type d) const
 iterator selection. Returns iterator to the first coefficient of the i-th component of the homogeneous part of degree 'd' More...
 
const_iterator end (size_type i, size_type d) const
 iterator selection. Returns iterator to an element after the last coefficient of the i-th component of the homogeneous part of degree 'd' More...
 
const IndexArraygetIndexArray () const
 

Member Typedef Documentation

◆ const_iterator

template<class ScalarT >
typedef const ScalarType* capd::autodiff::DagIndexer< ScalarT >::const_iterator

◆ IndexArray

template<class ScalarT >
typedef capd::diffAlgebra::CnContainer<MultiindexData,0,0,0> capd::autodiff::DagIndexer< ScalarT >::IndexArray

◆ iterator

template<class ScalarT >
typedef ScalarType* capd::autodiff::DagIndexer< ScalarT >::iterator

◆ RefVectorType

template<class ScalarT >
typedef capd::vectalg::ColumnVector<ScalarType,0> capd::autodiff::DagIndexer< ScalarT >::RefVectorType

◆ ScalarType

template<class ScalarT >
typedef ScalarT capd::autodiff::DagIndexer< ScalarT >::ScalarType

◆ size_type

template<class ScalarT >
typedef __size_type capd::autodiff::DagIndexer< ScalarT >::size_type

Constructor & Destructor Documentation

◆ DagIndexer() [1/2]

template<class Scalar >
capd::autodiff::DagIndexer< Scalar >::DagIndexer ( Dim  domain = 1,
Dim  image = 1,
Degree  degree = 1,
size_type  nodes = 1,
Order  order = 0 
)

◆ DagIndexer() [2/2]

template<class Scalar >
capd::autodiff::DagIndexer< Scalar >::DagIndexer ( const DagIndexer< ScalarT > &  dag)

◆ ~DagIndexer()

Member Function Documentation

◆ addMultiindexToMask()

template<class Scalar >
void capd::autodiff::DagIndexer< Scalar >::addMultiindexToMask ( const capd::vectalg::Multiindex i)

◆ begin() [1/6]

template<class T >
DagIndexer< T >::iterator capd::autodiff::DagIndexer< T >::begin
inline

iterator selection. Returns iterator to the first element in container

◆ begin() [2/6]

template<class T >
DagIndexer< T >::const_iterator capd::autodiff::DagIndexer< T >::begin
inline

iterator selection. Returns iterator to the first element in container

◆ begin() [3/6]

template<class T >
DagIndexer< T >::iterator capd::autodiff::DagIndexer< T >::begin ( size_type  i)
inline

iterator selection. Returns iterator to the first coefficient of the i-th component

◆ begin() [4/6]

template<class T >
DagIndexer< T >::const_iterator capd::autodiff::DagIndexer< T >::begin ( size_type  i) const
inline

iterator selection. Returns iterator to the first coefficient of the i-th component

◆ begin() [5/6]

template<class T >
DagIndexer< T >::iterator capd::autodiff::DagIndexer< T >::begin ( size_type  i,
size_type  d 
)
inline

iterator selection. Returns iterator to the first coefficient of the i-th component of the homogeneous part of degree 'd'

◆ begin() [6/6]

template<class T >
DagIndexer< T >::const_iterator capd::autodiff::DagIndexer< T >::begin ( size_type  i,
size_type  d 
) const
inline

iterator selection. Returns iterator to the first coefficient of the i-th component of the homogeneous part of degree 'd'

◆ coefficients() [1/2]

template<class ScalarT >
ScalarType * capd::autodiff::DagIndexer< ScalarT >::coefficients ( )
inline

◆ coefficients() [2/2]

template<class ScalarT >
const ScalarType * capd::autodiff::DagIndexer< ScalarT >::coefficients ( ) const
inline

◆ degree()

template<class ScalarT >
Dim capd::autodiff::DagIndexer< ScalarT >::degree ( ) const
inline

◆ domainDimension()

template<class ScalarT >
Dim capd::autodiff::DagIndexer< ScalarT >::domainDimension ( ) const
inline

◆ end() [1/6]

template<class T >
DagIndexer< T >::iterator capd::autodiff::DagIndexer< T >::end
inline

iterator selection. Returns iterator to the first element in container

◆ end() [2/6]

template<class T >
DagIndexer< T >::const_iterator capd::autodiff::DagIndexer< T >::end
inline

iterator selection. Returns iterator to the first element in container

◆ end() [3/6]

template<class T >
DagIndexer< T >::iterator capd::autodiff::DagIndexer< T >::end ( size_type  i)
inline

iterator selection. Returns iterator to an element after the last element the i-th component

◆ end() [4/6]

template<class T >
DagIndexer< T >::const_iterator capd::autodiff::DagIndexer< T >::end ( size_type  i) const
inline

iterator selection. Returns iterator to an element after the last element the i-th component

◆ end() [5/6]

template<class T >
DagIndexer< T >::iterator capd::autodiff::DagIndexer< T >::end ( size_type  i,
size_type  d 
)
inline

iterator selection. Returns iterator to an element after the last coefficient of the i-th component of the homogeneous part of degree 'd'

◆ end() [6/6]

template<class T >
DagIndexer< T >::const_iterator capd::autodiff::DagIndexer< T >::end ( size_type  i,
size_type  d 
) const
inline

iterator selection. Returns iterator to an element after the last coefficient of the i-th component of the homogeneous part of degree 'd'

◆ getIndexArray()

template<class ScalarT >
const IndexArray & capd::autodiff::DagIndexer< ScalarT >::getIndexArray ( ) const
inline

◆ getMask() [1/3]

template<class ScalarT >
const bool * capd::autodiff::DagIndexer< ScalarT >::getMask ( ) const
inline

◆ getMask() [2/3]

template<class ScalarT >
bool capd::autodiff::DagIndexer< ScalarT >::getMask ( size_type  j) const
inline

◆ getMask() [3/3]

template<class ScalarT >
bool capd::autodiff::DagIndexer< ScalarT >::getMask ( size_type  j,
size_type  c 
) const
inline

◆ getOrder()

template<class ScalarT >
Order capd::autodiff::DagIndexer< ScalarT >::getOrder ( ) const
inline

◆ imageDimension()

template<class ScalarT >
Dim capd::autodiff::DagIndexer< ScalarT >::imageDimension ( ) const
inline

◆ jetSize()

template<class ScalarT >
JetSize capd::autodiff::DagIndexer< ScalarT >::jetSize ( ) const
inline

◆ numberOfNodes()

template<class ScalarT >
size_type capd::autodiff::DagIndexer< ScalarT >::numberOfNodes ( ) const
inline

returns total number of nodes in DAG representing expression

◆ operator()() [1/4]

template<class ScalarT >
ScalarType & capd::autodiff::DagIndexer< ScalarT >::operator() ( VarNo  varNo,
CoeffNo  coeffNo 
)
inline

◆ operator()() [2/4]

template<class ScalarT >
ScalarType & capd::autodiff::DagIndexer< ScalarT >::operator() ( VarNo  varNo,
DerNo  derNo,
CoeffNo  coeffNo 
)
inline

◆ operator()() [3/4]

template<class ScalarT >
ScalarType & capd::autodiff::DagIndexer< ScalarT >::operator() ( VarNo  varNo,
DerNo  i,
DerNo  j,
DerNo  c,
CoeffNo  coeffNo 
)
inline

◆ operator()() [4/4]

template<class ScalarT >
ScalarType & capd::autodiff::DagIndexer< ScalarT >::operator() ( VarNo  varNo,
DerNo  j,
DerNo  c,
CoeffNo  coeffNo 
)
inline

◆ operator=()

template<class Scalar >
DagIndexer< Scalar > & capd::autodiff::DagIndexer< Scalar >::operator= ( const DagIndexer< ScalarT > &  dag)

◆ resetMask()

template<class Scalar >
void capd::autodiff::DagIndexer< Scalar >::resetMask

◆ resize()

template<class Scalar >
void capd::autodiff::DagIndexer< Scalar >::resize ( Dim  domain,
Dim  image,
Degree  degree,
size_type  nodes,
Order  order 
)

◆ setMask()

template<class T >
template<class Iterator >
void capd::autodiff::DagIndexer< T >::setMask ( Iterator  b,
Iterator  e 
)

This method defines a mask for computation of partial derivatives of the function represented by the instance.

Each element of the range [b,e) should be a valid Multiindex. The user can specify which partial derivatives he/she needs tp compute. Dependent derivatives are added to the list automatically and those independent are not evaluated which significantly speeds up the computation.

Example: setMask({Multiindex({1,1,0}),Multiindex({2,0,0})});

Here we request derivatives dx1dx2 and d^2x1. They depend on first order derivatives dx1 and dx2 which will be added automatically.

Parameters
[b,e)- iterator range of Multiindxes

◆ setOrder()

template<class Scalar >
void capd::autodiff::DagIndexer< Scalar >::setOrder ( Order  order)

◆ timeJetSize()

template<class ScalarT >
JetSize capd::autodiff::DagIndexer< ScalarT >::timeJetSize ( ) const
inline