C++ template class for definition of and operation on variables in a Taylor model. More...
#include <taylor_variable.hpp>
Public Member Functions | |
T | B () const |
Return range bounder. | |
T | bound () const |
Return range bounder. | |
const T & | boundT () 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< T > | P () const |
Cancel remainder error term and return polynomial part. | |
double | P (const double *x) const |
Evaluate polynomial part at point x | |
TaylorVariable< T > | polynomial () 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< U > | acos (const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | asin (const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | atan (const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | cos (const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | exp (const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | hull (const TaylorVariable< U > &, const TaylorVariable< U > &) |
template<typename U > | |
bool | inter (TaylorVariable< U > &, const TaylorVariable< U > &, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | inv (const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | log (const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | operator* (const TaylorVariable< U > &, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | operator* (const double, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | operator* (const TaylorVariable< U > &, const double) |
template<typename U > | |
TaylorVariable< U > | operator* (const U &, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | operator* (const TaylorVariable< U > &, const U &) |
template<typename U > | |
TaylorVariable< U > | operator+ (const TaylorVariable< U > &) |
template<typename U , typename V > | |
TaylorVariable< U > | operator+ (const TaylorVariable< U > &, const TaylorVariable< V > &) |
template<typename U , typename V > | |
TaylorVariable< U > | operator+ (const TaylorVariable< U > &, const V &) |
template<typename U , typename V > | |
TaylorVariable< U > | operator+ (const V &, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | operator+ (const double, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | operator+ (const TaylorVariable< U > &, const double) |
template<typename U > | |
TaylorVariable< U > | operator- (const TaylorVariable< U > &) |
template<typename U , typename V > | |
TaylorVariable< U > | operator- (const TaylorVariable< U > &, const TaylorVariable< V > &) |
template<typename U , typename V > | |
TaylorVariable< U > | operator- (const TaylorVariable< U > &, const V &) |
template<typename U , typename V > | |
TaylorVariable< U > | operator- (const V &, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | operator- (const double, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | operator- (const TaylorVariable< U > &, const double) |
template<typename U > | |
TaylorVariable< U > | operator/ (const TaylorVariable< U > &, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | operator/ (const double, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | operator/ (const TaylorVariable< U > &, const double) |
template<typename U > | |
std::ostream & | operator<< (std::ostream &, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | pow (const TaylorVariable< U > &, const int) |
template<typename U > | |
TaylorVariable< U > | pow (const TaylorVariable< U > &, const double) |
template<typename U > | |
TaylorVariable< U > | pow (const double, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | pow (const TaylorVariable< U > &, const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | sin (const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | sqr (const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | sqrt (const TaylorVariable< U > &) |
template<typename U > | |
TaylorVariable< U > | tan (const TaylorVariable< U > &) |
template<typename U > | |
void | TaylorModel (const unsigned int nvar, const unsigned int nord) |
class | TaylorVariable |
template<typename U > | |
TaylorVariable< U > | xlog (const TaylorVariable< U > &) |
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.
TaylorVariable< T >::TaylorVariable | ( | TaylorModel< T > * | TM, |
const double | d = 0. |
||
) |
Private constructor for a real scalar in a specific TaylorModel.
TaylorVariable< T >::TaylorVariable | ( | TaylorModel< T > * | TM, |
const T & | B | ||
) | [private] |
Private constructor for a range in a specific TaylorModel.
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.
T& TaylorVariable< T >::_bound | ( | T & | bndmod | ) | const [private] |
Range bounder.
T& TaylorVariable< T >::_bound_eigen | ( | T & | bndmod | ) | const [private] |
Range bounder - eignevalue decomposition-based approach.
T& TaylorVariable< T >::_bound_LSB | ( | T & | bndmod | ) | const [private] |
Range bounder - Lin & Stadtherr approach.
T& TaylorVariable< T >::_bound_naive | ( | T & | bndmod | ) | const [private] |
Range bounder - naive approach.
void TaylorVariable< T >::_center_TM | ( | ) | [private] |
Center remainder error term _bndrem.
void TaylorVariable< T >::_clean | ( | ) | [private] |
Clean private members.
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.
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.
void TaylorVariable< T >::_init | ( | ) | [private] |
Initialize private members.
TaylorVariable<T> TaylorVariable< T >::_intpow | ( | const TaylorVariable< T > & | TM, |
const int | n | ||
) | [private] |
Recursive calculation of nonnegative integer powers.
unsigned int TaylorVariable< T >::_nmon | ( | ) | const [inline, private] |
Get number of monomial terms in TaylorModel.
Definition at line 152 of file taylor_variable.hpp.
unsigned int TaylorVariable< T >::_nord | ( | ) | const [inline, private] |
Get model order in TaylorModel.
Definition at line 146 of file taylor_variable.hpp.
unsigned int TaylorVariable< T >::_nvar | ( | ) | const [inline, private] |
Get number of variables in TaylorModel.
Definition at line 149 of file taylor_variable.hpp.
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.
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.
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.
void TaylorVariable< T >::_reinit | ( | ) | [private] |
Reinitialize private members.
double TaylorVariable< T >::_scaling | ( | const unsigned int | i | ) | const [inline, private] |
Get scaling in TaylorModel.
Definition at line 176 of file taylor_variable.hpp.
TaylorVariable<T>* TaylorVariable< T >::_TV | ( | ) | const [inline, private] |
Get pointer to internal TaylorVariable in TaylorModel.
Definition at line 143 of file taylor_variable.hpp.
void TaylorVariable< T >::_update_bndord | ( | ) | [private] |
Update _bndord w/ (naive) bounds for individual terms of degrees 0,...,_nord()
BooleanType TaylorVariable< T >::isCompact | ( | ) | const |
Routine which returns BT_FALSE if there are components equal to "nan" or "INFTY".
Otherwise, BT_TRUE is returned.
TaylorVariable<T>& TaylorVariable< T >::operator*= | ( | const TaylorVariable< T > & | ) |
TaylorVariable<T>& TaylorVariable< T >::operator*= | ( | const double | ) |
TaylorVariable<T>& TaylorVariable< T >::operator*= | ( | const T & | ) |
TaylorVariable<T>& TaylorVariable< T >::operator+= | ( | const TaylorVariable< U > & | ) |
TaylorVariable<T>& TaylorVariable< T >::operator+= | ( | const U & | ) |
TaylorVariable<T>& TaylorVariable< T >::operator+= | ( | const double | ) |
TaylorVariable<T>& TaylorVariable< T >::operator-= | ( | const TaylorVariable< U > & | ) |
TaylorVariable<T>& TaylorVariable< T >::operator-= | ( | const U & | ) |
TaylorVariable<T>& TaylorVariable< T >::operator-= | ( | const double | ) |
TaylorVariable<T>& TaylorVariable< T >::operator/= | ( | const TaylorVariable< T > & | ) |
TaylorVariable<T>& TaylorVariable< T >::operator/= | ( | const double | ) |
TaylorVariable<T>& TaylorVariable< T >::operator= | ( | const double | ) |
More overloaded operators.
TaylorVariable<T>& TaylorVariable< T >::operator= | ( | const TaylorVariable< T > & | ) |
TaylorVariable<T>& TaylorVariable< T >::operator= | ( | const T & | ) |
TaylorVariable<U> acos | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> asin | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> atan | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> cos | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> exp | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> hull | ( | const TaylorVariable< U > & | , |
const TaylorVariable< U > & | |||
) | [friend] |
bool inter | ( | TaylorVariable< U > & | , |
const TaylorVariable< U > & | , | ||
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> inv | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> log | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> operator* | ( | const TaylorVariable< U > & | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> operator* | ( | const double | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> operator* | ( | const TaylorVariable< U > & | , |
const double | |||
) | [friend] |
TaylorVariable<U> operator* | ( | const U & | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> operator* | ( | const TaylorVariable< U > & | , |
const U & | |||
) | [friend] |
TaylorVariable<U> operator+ | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> operator+ | ( | const TaylorVariable< U > & | , |
const TaylorVariable< V > & | |||
) | [friend] |
TaylorVariable<U> operator+ | ( | const TaylorVariable< U > & | , |
const V & | |||
) | [friend] |
TaylorVariable<U> operator+ | ( | const V & | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> operator+ | ( | const double | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> operator+ | ( | const TaylorVariable< U > & | , |
const double | |||
) | [friend] |
TaylorVariable<U> operator- | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> operator- | ( | const TaylorVariable< U > & | , |
const TaylorVariable< V > & | |||
) | [friend] |
TaylorVariable<U> operator- | ( | const TaylorVariable< U > & | , |
const V & | |||
) | [friend] |
TaylorVariable<U> operator- | ( | const V & | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> operator- | ( | const double | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> operator- | ( | const TaylorVariable< U > & | , |
const double | |||
) | [friend] |
TaylorVariable<U> operator/ | ( | const TaylorVariable< U > & | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> operator/ | ( | const double | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> operator/ | ( | const TaylorVariable< U > & | , |
const double | |||
) | [friend] |
std::ostream& operator<< | ( | std::ostream & | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> pow | ( | const TaylorVariable< U > & | , |
const int | |||
) | [friend] |
TaylorVariable<U> pow | ( | const TaylorVariable< U > & | , |
const double | |||
) | [friend] |
TaylorVariable<U> pow | ( | const double | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> pow | ( | const TaylorVariable< U > & | , |
const TaylorVariable< U > & | |||
) | [friend] |
TaylorVariable<U> sin | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> sqr | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> sqrt | ( | const TaylorVariable< U > & | ) | [friend] |
TaylorVariable<U> tan | ( | const TaylorVariable< U > & | ) | [friend] |
void TaylorModel | ( | const unsigned int | nvar, |
const unsigned int | nord | ||
) | [friend] |
friend class TaylorVariable [friend] |
Definition at line 57 of file taylor_variable.hpp.
TaylorVariable<U> xlog | ( | const TaylorVariable< U > & | ) | [friend] |
T* TaylorVariable< T >::_bndord [private] |
Bounds for individual terms of degrees 0,...,_nord+1.
Definition at line 333 of file taylor_variable.hpp.
T* TaylorVariable< T >::_bndrem [private] |
Pointer to the remainder error bound.
Definition at line 335 of file taylor_variable.hpp.
T TaylorVariable< T >::_bndT [private] |
Interval bound evaluated in T arithmetic.
Definition at line 337 of file taylor_variable.hpp.
double* TaylorVariable< T >::_coefmon [private] |
Coefficients for monomial terms 1,...,nmon.
Definition at line 331 of file taylor_variable.hpp.
TaylorModel<T>* TaylorVariable< T >::_TM [private] |
Pointer to underlying TaylorModel object.
Definition at line 141 of file taylor_variable.hpp.