Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
TaylorVariable< T > Class Template Reference

C++ template class for definition of and operation on variables in a Taylor model. More...

#include <taylor_variable.hpp>

List of all members.

Public Member Functions

T B () const
 Return range bounder.
T bound () const
 Return range bounder.
const TboundT () const
 Return reference to range bounder in T arithmetic.
TaylorVariable< T > & C ()
 Recenter remainder term.
TaylorVariable< T > & center ()
 Return reference to current remainder.
double constant () const
 Return coefficient value in constant term.
TaylorModel< T > * env () const
 Return pointer to TaylorModel environment.
BooleanType isCompact () const
double * linear () const
 Return pointer to array of size nvar comprising coefficients in linear term.
TaylorVariable< T > & operator*= (const TaylorVariable< T > &)
TaylorVariable< T > & operator*= (const double)
TaylorVariable< T > & operator*= (const T &)
template<typename U >
TaylorVariable< T > & operator+= (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< T > & operator+= (const U &)
TaylorVariable< T > & operator+= (const double)
template<typename U >
TaylorVariable< T > & operator-= (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< T > & operator-= (const U &)
TaylorVariable< T > & operator-= (const double)
TaylorVariable< T > & operator/= (const TaylorVariable< T > &)
TaylorVariable< T > & operator/= (const double)
TaylorVariable< T > & operator= (const double)
 More overloaded operators.
TaylorVariable< T > & operator= (const TaylorVariable< T > &)
TaylorVariable< T > & operator= (const T &)
TaylorVariable< TP () const
 Cancel remainder error term and return polynomial part.
double P (const double *x) const
 Evaluate polynomial part at point x
TaylorVariable< Tpolynomial () const
 Cancel remainder term and return polynomial part.
double polynomial (const double *x) const
 Evaluate polynomial part at point x
double * quadratic (const int opt=0) const
 Return pointer to array of size nvar comprising coefficients in quadratic term (diagonal coefs if opt=0; upper triangular part otherwise)
T R () const
 Return const reference to current remainder.
double * reference () const
 Return pointer to array of size nvar comprising reference point.
T remainder () const
 Return const reference to current remainder.
TaylorVariable< T > & set (TaylorModel< T > *TM, const unsigned int ix, const T &X)
 Set the index and range for the variable ivar, that belongs to the interval X.
 TaylorVariable (const double d=0.)
 Constructor for a real scalar.
 TaylorVariable (const T &B)
 Constructor for a T variable.
 TaylorVariable (TaylorModel< T > *TM, const unsigned int ix, const T &X)
 Constructor for the variable ix, that belongs to the interval X
 TaylorVariable (const TaylorVariable< T > &TV)
 Copy constructor for identical range bounder.
template<typename U >
 TaylorVariable (TaylorModel< T > *&TM, const TaylorVariable< U > &TV)
 Copy constructor for different range bounder with implicit type conversion.
template<typename U >
 TaylorVariable (TaylorModel< T > *&TM, const TaylorVariable< U > &TV, const T &(U::*method)() const )
 Copy constructor for different range bounder with explicit type conversion class member function.
template<typename U >
 TaylorVariable (TaylorModel< T > *&TM, const TaylorVariable< U > &TV, T(*method)(const U &))
 Copy constructor for different range bounder with explicit type conversion non-class function.
 TaylorVariable (TaylorModel< T > *TM, const double d=0.)
 Private constructor for a real scalar in a specific TaylorModel.
 ~TaylorVariable ()
 Class destructor.

Private Member Functions

const T_bndmon (const unsigned int i) const
 Get bounds on all monomial terms in TaylorModel.
T_bound (T &bndmod) const
 Range bounder.
T_bound_eigen (T &bndmod) const
 Range bounder - eignevalue decomposition-based approach.
T_bound_LSB (T &bndmod) const
 Range bounder - Lin & Stadtherr approach.
T_bound_naive (T &bndmod) const
 Range bounder - naive approach.
void _center_TM ()
 Center remainder error term _bndrem.
void _clean ()
 Clean private members.
unsigned int _expmon (const unsigned int i) const
 Get monomial term exponents in TaylorModel.
void _init ()
 Initialize private members.
TaylorVariable< T_intpow (const TaylorVariable< T > &TM, const int n)
 Recursive calculation of nonnegative integer powers.
unsigned int _nmon () const
 Get number of monomial terms in TaylorModel.
unsigned int _nord () const
 Get model order in TaylorModel.
unsigned int _nvar () const
 Get number of variables in TaylorModel.
unsigned int _posord (const unsigned int i) const
 Get term positions in TaylorModel.
unsigned int _prodmon (const unsigned int i, const unsigned int j) const
 Get exponents of monomial term products in TaylorModel.
double _refpoint (const unsigned int i) const
 Get reference point in TaylorModel.
void _reinit ()
 Reinitialize private members.
double _scaling (const unsigned int i) const
 Get scaling in TaylorModel.
TaylorVariable< T > * _TV () const
 Get pointer to internal TaylorVariable in TaylorModel.
void _update_bndord ()
 Update _bndord w/ (naive) bounds for individual terms of degrees 0,...,_nord()
 TaylorVariable (TaylorModel< T > *TM, const T &B)
 Private constructor for a range in a specific TaylorModel.

Static Private Member Functions

static double * _eigen (const unsigned int n, double *a)
 Wrapper to LAPACK function _dsyev doing eigenvalue decomposition of a symmetric matrix.

Private Attributes

T_bndord
 Bounds for individual terms of degrees 0,...,_nord+1.
T_bndrem
 Pointer to the remainder error bound.
T _bndT
 Interval bound evaluated in T arithmetic.
double * _coefmon
 Coefficients for monomial terms 1,...,nmon.
TaylorModel< T > * _TM
 Pointer to underlying TaylorModel object.

Friends

template<typename U >
TaylorVariable< Uacos (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uasin (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uatan (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Ucos (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uexp (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uhull (const TaylorVariable< U > &, const TaylorVariable< U > &)
template<typename U >
bool inter (TaylorVariable< U > &, const TaylorVariable< U > &, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uinv (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Ulog (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uoperator* (const TaylorVariable< U > &, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uoperator* (const double, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uoperator* (const TaylorVariable< U > &, const double)
template<typename U >
TaylorVariable< Uoperator* (const U &, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uoperator* (const TaylorVariable< U > &, const U &)
template<typename U >
TaylorVariable< Uoperator+ (const TaylorVariable< U > &)
template<typename U , typename V >
TaylorVariable< Uoperator+ (const TaylorVariable< U > &, const TaylorVariable< V > &)
template<typename U , typename V >
TaylorVariable< Uoperator+ (const TaylorVariable< U > &, const V &)
template<typename U , typename V >
TaylorVariable< Uoperator+ (const V &, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uoperator+ (const double, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uoperator+ (const TaylorVariable< U > &, const double)
template<typename U >
TaylorVariable< Uoperator- (const TaylorVariable< U > &)
template<typename U , typename V >
TaylorVariable< Uoperator- (const TaylorVariable< U > &, const TaylorVariable< V > &)
template<typename U , typename V >
TaylorVariable< Uoperator- (const TaylorVariable< U > &, const V &)
template<typename U , typename V >
TaylorVariable< Uoperator- (const V &, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uoperator- (const double, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uoperator- (const TaylorVariable< U > &, const double)
template<typename U >
TaylorVariable< Uoperator/ (const TaylorVariable< U > &, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uoperator/ (const double, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Uoperator/ (const TaylorVariable< U > &, const double)
template<typename U >
std::ostream & operator<< (std::ostream &, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Upow (const TaylorVariable< U > &, const int)
template<typename U >
TaylorVariable< Upow (const TaylorVariable< U > &, const double)
template<typename U >
TaylorVariable< Upow (const double, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Upow (const TaylorVariable< U > &, const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Usin (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Usqr (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Usqrt (const TaylorVariable< U > &)
template<typename U >
TaylorVariable< Utan (const TaylorVariable< U > &)
template<typename U >
void TaylorModel (const unsigned int nvar, const unsigned int nord)
class TaylorVariable
template<typename U >
TaylorVariable< Uxlog (const TaylorVariable< U > &)

Detailed Description

template<typename T>
class TaylorVariable< T >

C++ template class for definition of and operation on variables in a Taylor model.

mc::TaylorVariable<T> is a C++ template class for definition of and operation on the variables participating in a Taylor model of a factorable function. The template parameter T corresponds to the type used in computing the remainder error bound in the Taylor model.

Definition at line 50 of file taylor_variable.hpp.


Constructor & Destructor Documentation

template<typename T>
TaylorVariable< T >::TaylorVariable ( TaylorModel< T > *  TM,
const double  d = 0. 
)

Private constructor for a real scalar in a specific TaylorModel.

template<typename T>
TaylorVariable< T >::TaylorVariable ( TaylorModel< T > *  TM,
const T B 
) [private]

Private constructor for a range in a specific TaylorModel.


Member Function Documentation

template<typename T>
const T& TaylorVariable< T >::_bndmon ( const unsigned int  i) const [inline, private]

Get bounds on all monomial terms in TaylorModel.

Definition at line 168 of file taylor_variable.hpp.

template<typename T>
T& TaylorVariable< T >::_bound ( T bndmod) const [private]

Range bounder.

template<typename T>
T& TaylorVariable< T >::_bound_eigen ( T bndmod) const [private]

Range bounder - eignevalue decomposition-based approach.

template<typename T>
T& TaylorVariable< T >::_bound_LSB ( T bndmod) const [private]

Range bounder - Lin & Stadtherr approach.

template<typename T>
T& TaylorVariable< T >::_bound_naive ( T bndmod) const [private]

Range bounder - naive approach.

template<typename T>
void TaylorVariable< T >::_center_TM ( ) [private]

Center remainder error term _bndrem.

template<typename T>
void TaylorVariable< T >::_clean ( ) [private]

Clean private members.

template<typename T>
static double* TaylorVariable< T >::_eigen ( const unsigned int  n,
double *  a 
) [static, private]

Wrapper to LAPACK function _dsyev doing eigenvalue decomposition of a symmetric matrix.

template<typename T>
unsigned int TaylorVariable< T >::_expmon ( const unsigned int  i) const [inline, private]

Get monomial term exponents in TaylorModel.

Definition at line 160 of file taylor_variable.hpp.

template<typename T>
void TaylorVariable< T >::_init ( ) [private]

Initialize private members.

template<typename T>
TaylorVariable<T> TaylorVariable< T >::_intpow ( const TaylorVariable< T > &  TM,
const int  n 
) [private]

Recursive calculation of nonnegative integer powers.

template<typename T>
unsigned int TaylorVariable< T >::_nmon ( ) const [inline, private]

Get number of monomial terms in TaylorModel.

Definition at line 152 of file taylor_variable.hpp.

template<typename T>
unsigned int TaylorVariable< T >::_nord ( ) const [inline, private]

Get model order in TaylorModel.

Definition at line 146 of file taylor_variable.hpp.

template<typename T>
unsigned int TaylorVariable< T >::_nvar ( ) const [inline, private]

Get number of variables in TaylorModel.

Definition at line 149 of file taylor_variable.hpp.

template<typename T>
unsigned int TaylorVariable< T >::_posord ( const unsigned int  i) const [inline, private]

Get term positions in TaylorModel.

Definition at line 156 of file taylor_variable.hpp.

template<typename T>
unsigned int TaylorVariable< T >::_prodmon ( const unsigned int  i,
const unsigned int  j 
) const [inline, private]

Get exponents of monomial term products in TaylorModel.

Definition at line 164 of file taylor_variable.hpp.

template<typename T>
double TaylorVariable< T >::_refpoint ( const unsigned int  i) const [inline, private]

Get reference point in TaylorModel.

Definition at line 172 of file taylor_variable.hpp.

template<typename T>
void TaylorVariable< T >::_reinit ( ) [private]

Reinitialize private members.

template<typename T>
double TaylorVariable< T >::_scaling ( const unsigned int  i) const [inline, private]

Get scaling in TaylorModel.

Definition at line 176 of file taylor_variable.hpp.

template<typename T>
TaylorVariable<T>* TaylorVariable< T >::_TV ( ) const [inline, private]

Get pointer to internal TaylorVariable in TaylorModel.

Definition at line 143 of file taylor_variable.hpp.

template<typename T>
void TaylorVariable< T >::_update_bndord ( ) [private]

Update _bndord w/ (naive) bounds for individual terms of degrees 0,...,_nord()

template<typename T>
BooleanType TaylorVariable< T >::isCompact ( ) const

Routine which returns BT_FALSE if there are components equal to "nan" or "INFTY".
Otherwise, BT_TRUE is returned.

template<typename T>
TaylorVariable<T>& TaylorVariable< T >::operator*= ( const TaylorVariable< T > &  )
template<typename T>
TaylorVariable<T>& TaylorVariable< T >::operator*= ( const double  )
template<typename T>
TaylorVariable<T>& TaylorVariable< T >::operator*= ( const T )
template<typename T>
template<typename U >
TaylorVariable<T>& TaylorVariable< T >::operator+= ( const TaylorVariable< U > &  )
template<typename T>
template<typename U >
TaylorVariable<T>& TaylorVariable< T >::operator+= ( const U )
template<typename T>
TaylorVariable<T>& TaylorVariable< T >::operator+= ( const double  )
template<typename T>
template<typename U >
TaylorVariable<T>& TaylorVariable< T >::operator-= ( const TaylorVariable< U > &  )
template<typename T>
template<typename U >
TaylorVariable<T>& TaylorVariable< T >::operator-= ( const U )
template<typename T>
TaylorVariable<T>& TaylorVariable< T >::operator-= ( const double  )
template<typename T>
TaylorVariable<T>& TaylorVariable< T >::operator/= ( const TaylorVariable< T > &  )
template<typename T>
TaylorVariable<T>& TaylorVariable< T >::operator/= ( const double  )
template<typename T>
TaylorVariable<T>& TaylorVariable< T >::operator= ( const double  )

More overloaded operators.

template<typename T>
TaylorVariable<T>& TaylorVariable< T >::operator= ( const TaylorVariable< T > &  )
template<typename T>
TaylorVariable<T>& TaylorVariable< T >::operator= ( const T )

Friends And Related Function Documentation

template<typename T>
template<typename U >
TaylorVariable<U> acos ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> asin ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> atan ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> cos ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> exp ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> hull ( const TaylorVariable< U > &  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
bool inter ( TaylorVariable< U > &  ,
const TaylorVariable< U > &  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> inv ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> log ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator* ( const TaylorVariable< U > &  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator* ( const double  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator* ( const TaylorVariable< U > &  ,
const double   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator* ( const U ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator* ( const TaylorVariable< U > &  ,
const U  
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator+ ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U , typename V >
TaylorVariable<U> operator+ ( const TaylorVariable< U > &  ,
const TaylorVariable< V > &   
) [friend]
template<typename T>
template<typename U , typename V >
TaylorVariable<U> operator+ ( const TaylorVariable< U > &  ,
const V  
) [friend]
template<typename T>
template<typename U , typename V >
TaylorVariable<U> operator+ ( const V ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator+ ( const double  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator+ ( const TaylorVariable< U > &  ,
const double   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator- ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U , typename V >
TaylorVariable<U> operator- ( const TaylorVariable< U > &  ,
const TaylorVariable< V > &   
) [friend]
template<typename T>
template<typename U , typename V >
TaylorVariable<U> operator- ( const TaylorVariable< U > &  ,
const V  
) [friend]
template<typename T>
template<typename U , typename V >
TaylorVariable<U> operator- ( const V ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator- ( const double  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator- ( const TaylorVariable< U > &  ,
const double   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator/ ( const TaylorVariable< U > &  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator/ ( const double  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> operator/ ( const TaylorVariable< U > &  ,
const double   
) [friend]
template<typename T>
template<typename U >
std::ostream& operator<< ( std::ostream &  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> pow ( const TaylorVariable< U > &  ,
const int   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> pow ( const TaylorVariable< U > &  ,
const double   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> pow ( const double  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> pow ( const TaylorVariable< U > &  ,
const TaylorVariable< U > &   
) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> sin ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> sqr ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> sqrt ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
TaylorVariable<U> tan ( const TaylorVariable< U > &  ) [friend]
template<typename T>
template<typename U >
void TaylorModel ( const unsigned int  nvar,
const unsigned int  nord 
) [friend]
template<typename T>
friend class TaylorVariable [friend]

Definition at line 57 of file taylor_variable.hpp.

template<typename T>
template<typename U >
TaylorVariable<U> xlog ( const TaylorVariable< U > &  ) [friend]

Member Data Documentation

template<typename T>
T* TaylorVariable< T >::_bndord [private]

Bounds for individual terms of degrees 0,...,_nord+1.

Definition at line 333 of file taylor_variable.hpp.

template<typename T>
T* TaylorVariable< T >::_bndrem [private]

Pointer to the remainder error bound.

Definition at line 335 of file taylor_variable.hpp.

template<typename T>
T TaylorVariable< T >::_bndT [private]

Interval bound evaluated in T arithmetic.

Definition at line 337 of file taylor_variable.hpp.

template<typename T>
double* TaylorVariable< T >::_coefmon [private]

Coefficients for monomial terms 1,...,nmon.

Definition at line 331 of file taylor_variable.hpp.

template<typename T>
TaylorModel<T>* TaylorVariable< T >::_TM [private]

Pointer to underlying TaylorModel object.

Definition at line 141 of file taylor_variable.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:40