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

C++ class supporting the definition and computation of Taylor models for factorable functions. More...

#include <taylor_model.hpp>

List of all members.

Classes

class  Exceptions
 Taylor model exceptions. More...
struct  Options
 Taylor model options. More...

Public Member Functions

unsigned int nord () const
 Get order of the TaylorModel.
unsigned int nvar () const
 Get number of variables in the TaylorModel.
void reset ()
 Reset the TaylorModel.
 TaylorModel (const unsigned int nvar_, const unsigned int nord_)
 Constructor.
 ~TaylorModel ()
 Destructor.

Static Public Member Functions

static void pause ()
 Pause the program execution and prompt the user.

Public Attributes

struct TaylorModel::Options options

Private Member Functions

void _cleanup ()
 Clean up the arrays.
unsigned int _get_binom (const unsigned int n, const unsigned int k) const
 Return binomial coefficient $\left(\stackrel{i}{j}\right)$.
unsigned int _loc_expmon (const unsigned int *iexp)
 Locates position in _posord of monomial term with variable exponents iexp.
void _next_expmon (unsigned int *iexp, const unsigned int iord)
 Generate exponent configuration for subsequent monomial terms.
void _reset ()
 Reset the variable bound arrays.
void _set_binom ()
 Populate array _binom w/ binomial coefficients.
void _set_bndmon ()
 Populate _bndmon w/ bounds on all possible monomial terms.
void _set_bndpow (const unsigned int ix, const T &X, const double scaling)
 Populate _bndpow[ix] w/ bounds on the terms $[X-{\rm mid}(X)]^{ix}$.
void _set_expmon ()
 Populate array _expmon w/ exponents for monomial terms 1,...,nmon.
void _set_posord ()
 Populate array _posord w/ positions of terms of degrees 1,...,nord.
void _set_prodmon ()
 Populate array _prodmon w/ exponents resulting from the product of two monomial terms 1,...,nmon.
void _size (const unsigned int nvar, const unsigned int nord)
 Set the order (nord) and number of variables (nvar)

Static Private Member Functions

template<typename U >
static void _display (const unsigned int m, const unsigned int n, U *&a, const unsigned int lda, const std::string &stra, std::ostream &os)
 Display the elements of a 2D array.

Private Attributes

unsigned int * _binom
 Binomial coefficients.
T_bndmon
 Bounds on all the monomial terms 1,...,_nmon for given interval vector $X$.
T ** _bndpow
 Bounds on the terms $[X-{\rm mid}(X)]^i$ for given $X$.
unsigned int * _expmon
 Variable exponents for monomial terms 1,...,_nmon.
bool _modvar
 Have any of the model variables been modified?
unsigned int _nmon
 Number of monomial terms.
unsigned int _nord
 Model order of the model.
unsigned int _nvar
 Number of independent variables.
unsigned int * _posord
 Positions of terms of degrees 1,...,_nord.
unsigned int ** _prodmon
 Variable exponents resulting from the product of two monomial terms 1,...,_nmon.
double * _refpoint
 Reference point.
double * _scaling
 Variable scaling.
TaylorVariable< T > * _TV
 Taylor variable to speed-up computations and reduce dynamic allocation.

Friends

class TaylorModel
class TaylorVariable< T >

Detailed Description

template<typename T>
class TaylorModel< T >

C++ class supporting the definition and computation of Taylor models for factorable functions.

mc::TaylorModel<T> is a C++ base class that supports the definition and computation of Taylor models for factorable functions on a box. The template parameter T corresponds to the type used in computing the remainder error bound.

Definition at line 52 of file taylor_model.hpp.


Constructor & Destructor Documentation

template<typename T>
TaylorModel< T >::TaylorModel ( const unsigned int  nvar_,
const unsigned int  nord_ 
) [inline]

Constructor.

Definition at line 63 of file taylor_model.hpp.

template<typename T>
TaylorModel< T >::~TaylorModel ( ) [inline]

Destructor.

Definition at line 67 of file taylor_model.hpp.


Member Function Documentation

template<typename T>
void TaylorModel< T >::_cleanup ( ) [private]

Clean up the arrays.

template<typename T>
template<typename U >
static void TaylorModel< T >::_display ( const unsigned int  m,
const unsigned int  n,
U *&  a,
const unsigned int  lda,
const std::string &  stra,
std::ostream &  os 
) [static, private]

Display the elements of a 2D array.

template<typename T>
unsigned int TaylorModel< T >::_get_binom ( const unsigned int  n,
const unsigned int  k 
) const [private]

Return binomial coefficient $\left(\stackrel{i}{j}\right)$.

template<typename T>
unsigned int TaylorModel< T >::_loc_expmon ( const unsigned int *  iexp) [private]

Locates position in _posord of monomial term with variable exponents iexp.

template<typename T>
void TaylorModel< T >::_next_expmon ( unsigned int *  iexp,
const unsigned int  iord 
) [private]

Generate exponent configuration for subsequent monomial terms.

template<typename T>
void TaylorModel< T >::_reset ( ) [private]

Reset the variable bound arrays.

template<typename T>
void TaylorModel< T >::_set_binom ( ) [private]

Populate array _binom w/ binomial coefficients.

template<typename T>
void TaylorModel< T >::_set_bndmon ( ) [private]

Populate _bndmon w/ bounds on all possible monomial terms.

template<typename T>
void TaylorModel< T >::_set_bndpow ( const unsigned int  ix,
const T X,
const double  scaling 
) [private]

Populate _bndpow[ix] w/ bounds on the terms $[X-{\rm mid}(X)]^{ix}$.

template<typename T>
void TaylorModel< T >::_set_expmon ( ) [private]

Populate array _expmon w/ exponents for monomial terms 1,...,nmon.

template<typename T>
void TaylorModel< T >::_set_posord ( ) [private]

Populate array _posord w/ positions of terms of degrees 1,...,nord.

template<typename T>
void TaylorModel< T >::_set_prodmon ( ) [private]

Populate array _prodmon w/ exponents resulting from the product of two monomial terms 1,...,nmon.

template<typename T>
void TaylorModel< T >::_size ( const unsigned int  nvar,
const unsigned int  nord 
) [private]

Set the order (nord) and number of variables (nvar)

template<typename T>
unsigned int TaylorModel< T >::nord ( ) const [inline]

Get order of the TaylorModel.

Definition at line 74 of file taylor_model.hpp.

template<typename T>
unsigned int TaylorModel< T >::nvar ( ) const [inline]

Get number of variables in the TaylorModel.

Definition at line 71 of file taylor_model.hpp.

template<typename T>
static void TaylorModel< T >::pause ( ) [static]

Pause the program execution and prompt the user.

template<typename T>
void TaylorModel< T >::reset ( ) [inline]

Reset the TaylorModel.

Definition at line 77 of file taylor_model.hpp.


Friends And Related Function Documentation

template<typename T>
friend class TaylorModel [friend]

Definition at line 57 of file taylor_model.hpp.

template<typename T>
friend class TaylorVariable< T > [friend]

Definition at line 56 of file taylor_model.hpp.


Member Data Documentation

template<typename T>
unsigned int* TaylorModel< T >::_binom [private]

Binomial coefficients.

Definition at line 175 of file taylor_model.hpp.

template<typename T>
T* TaylorModel< T >::_bndmon [private]

Bounds on all the monomial terms 1,...,_nmon for given interval vector $X$.

Definition at line 171 of file taylor_model.hpp.

template<typename T>
T** TaylorModel< T >::_bndpow [private]

Bounds on the terms $[X-{\rm mid}(X)]^i$ for given $X$.

Definition at line 177 of file taylor_model.hpp.

template<typename T>
unsigned int* TaylorModel< T >::_expmon [private]

Variable exponents for monomial terms 1,...,_nmon.

Definition at line 167 of file taylor_model.hpp.

template<typename T>
bool TaylorModel< T >::_modvar [private]

Have any of the model variables been modified?

Definition at line 173 of file taylor_model.hpp.

template<typename T>
unsigned int TaylorModel< T >::_nmon [private]

Number of monomial terms.

Definition at line 163 of file taylor_model.hpp.

template<typename T>
unsigned int TaylorModel< T >::_nord [private]

Model order of the model.

Definition at line 159 of file taylor_model.hpp.

template<typename T>
unsigned int TaylorModel< T >::_nvar [private]

Number of independent variables.

Definition at line 161 of file taylor_model.hpp.

template<typename T>
unsigned int* TaylorModel< T >::_posord [private]

Positions of terms of degrees 1,...,_nord.

Definition at line 165 of file taylor_model.hpp.

template<typename T>
unsigned int** TaylorModel< T >::_prodmon [private]

Variable exponents resulting from the product of two monomial terms 1,...,_nmon.

Definition at line 169 of file taylor_model.hpp.

template<typename T>
double* TaylorModel< T >::_refpoint [private]

Reference point.

Definition at line 179 of file taylor_model.hpp.

template<typename T>
double* TaylorModel< T >::_scaling [private]

Variable scaling.

Definition at line 181 of file taylor_model.hpp.

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

Taylor variable to speed-up computations and reduce dynamic allocation.

Definition at line 184 of file taylor_model.hpp.

template<typename T>
struct TaylorModel::Options TaylorModel< T >::options

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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:26