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

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

#include <taylor_model.hpp>

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. More...
 
unsigned int nvar () const
 Get number of variables in the TaylorModel. More...
 
void reset ()
 Reset the TaylorModel. More...
 
 TaylorModel (const unsigned int nvar_, const unsigned int nord_)
 Constructor. More...
 
 ~TaylorModel ()
 Destructor. More...
 

Static Public Member Functions

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

Public Attributes

struct TaylorModel::Options options
 

Private Member Functions

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

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. More...
 

Private Attributes

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

Friends

template<typename U >
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 
)
staticprivate

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>
template<typename U >
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 Mon Jun 10 2019 12:35:27