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. | |
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 . | |
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 . | |
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 . | |
T ** | _bndpow |
Bounds on the terms for given . | |
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 > |
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.
TaylorModel< T >::TaylorModel | ( | const unsigned int | nvar_, |
const unsigned int | nord_ | ||
) | [inline] |
Constructor.
Definition at line 63 of file taylor_model.hpp.
TaylorModel< T >::~TaylorModel | ( | ) | [inline] |
Destructor.
Definition at line 67 of file taylor_model.hpp.
void TaylorModel< T >::_cleanup | ( | ) | [private] |
Clean up the arrays.
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.
unsigned int TaylorModel< T >::_get_binom | ( | const unsigned int | n, |
const unsigned int | k | ||
) | const [private] |
Return binomial coefficient .
unsigned int TaylorModel< T >::_loc_expmon | ( | const unsigned int * | iexp | ) | [private] |
Locates position in _posord of monomial term with variable exponents iexp.
void TaylorModel< T >::_next_expmon | ( | unsigned int * | iexp, |
const unsigned int | iord | ||
) | [private] |
Generate exponent configuration for subsequent monomial terms.
void TaylorModel< T >::_reset | ( | ) | [private] |
Reset the variable bound arrays.
void TaylorModel< T >::_set_binom | ( | ) | [private] |
Populate array _binom w/ binomial coefficients.
void TaylorModel< T >::_set_bndmon | ( | ) | [private] |
Populate _bndmon w/ bounds on all possible monomial terms.
void TaylorModel< T >::_set_bndpow | ( | const unsigned int | ix, |
const T & | X, | ||
const double | scaling | ||
) | [private] |
Populate _bndpow[ix] w/ bounds on the terms .
void TaylorModel< T >::_set_expmon | ( | ) | [private] |
Populate array _expmon w/ exponents for monomial terms 1,...,nmon.
void TaylorModel< T >::_set_posord | ( | ) | [private] |
Populate array _posord w/ positions of terms of degrees 1,...,nord.
void TaylorModel< T >::_set_prodmon | ( | ) | [private] |
Populate array _prodmon w/ exponents resulting from the product of two monomial terms 1,...,nmon.
void TaylorModel< T >::_size | ( | const unsigned int | nvar, |
const unsigned int | nord | ||
) | [private] |
Set the order (nord) and number of variables (nvar)
unsigned int TaylorModel< T >::nord | ( | ) | const [inline] |
Get order of the TaylorModel.
Definition at line 74 of file taylor_model.hpp.
unsigned int TaylorModel< T >::nvar | ( | ) | const [inline] |
Get number of variables in the TaylorModel.
Definition at line 71 of file taylor_model.hpp.
static void TaylorModel< T >::pause | ( | ) | [static] |
Pause the program execution and prompt the user.
void TaylorModel< T >::reset | ( | ) | [inline] |
Reset the TaylorModel.
Definition at line 77 of file taylor_model.hpp.
friend class TaylorModel [friend] |
Definition at line 57 of file taylor_model.hpp.
friend class TaylorVariable< T > [friend] |
Definition at line 56 of file taylor_model.hpp.
unsigned int* TaylorModel< T >::_binom [private] |
Binomial coefficients.
Definition at line 175 of file taylor_model.hpp.
T* TaylorModel< T >::_bndmon [private] |
Bounds on all the monomial terms 1,...,_nmon for given interval vector .
Definition at line 171 of file taylor_model.hpp.
T** TaylorModel< T >::_bndpow [private] |
Bounds on the terms for given .
Definition at line 177 of file taylor_model.hpp.
unsigned int* TaylorModel< T >::_expmon [private] |
Variable exponents for monomial terms 1,...,_nmon.
Definition at line 167 of file taylor_model.hpp.
bool TaylorModel< T >::_modvar [private] |
Have any of the model variables been modified?
Definition at line 173 of file taylor_model.hpp.
unsigned int TaylorModel< T >::_nmon [private] |
Number of monomial terms.
Definition at line 163 of file taylor_model.hpp.
unsigned int TaylorModel< T >::_nord [private] |
Model order of the model.
Definition at line 159 of file taylor_model.hpp.
unsigned int TaylorModel< T >::_nvar [private] |
Number of independent variables.
Definition at line 161 of file taylor_model.hpp.
unsigned int* TaylorModel< T >::_posord [private] |
Positions of terms of degrees 1,...,_nord.
Definition at line 165 of file taylor_model.hpp.
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.
double* TaylorModel< T >::_refpoint [private] |
Reference point.
Definition at line 179 of file taylor_model.hpp.
double* TaylorModel< T >::_scaling [private] |
Variable scaling.
Definition at line 181 of file taylor_model.hpp.
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.
struct TaylorModel::Options TaylorModel< T >::options |