MC++
mc::PolyVar< T > Class Template Referenceabstract

C++ base class for the computation of polynomial models for factorable functions: Variable. More...

#include <polymodel.hpp>

Inheritance diagram for mc::PolyVar< T >:
Collaboration diagram for mc::PolyVar< T >:

Public Member Functions

unsigned int nord () const
 Order of polynomial model.
 
unsigned int nvar () const
 Number of variables in polynomial model.
 
unsigned int nmon () const
 Total number of monomial terms in polynomial model.
 
 PolyVar (PolyModel *env=0)
 Constructor of variable linked to polynomial model environment env
 
 PolyVar (const PolyVar< T > &var)
 Copy constructor of variable.
 
virtual ~PolyVar ()
 Destructor of variable.
 
virtual PolyVar< T > & set (PolyModel *env)
 Set polynomial model environment in variable as env
 
virtual PolyVar< T > & set (const double *coefmon)
 Set multivariate polynomial coefficients in variable as coefmon
 
virtual PolyVar< T > & set (std::pair< unsigned int, const double * > &coefmon)
 Set multivariate polynomial coefficients in variable as coefmon - only first coefmon.first coefficients are set.
 
virtual PolyVar< T > & set (const T &bndrem)
 Set remainder term in variable as bndrem
 
virtual PolyVar< T > & set (const PolyVar< T > &var, const bool reset=true)
 Set multivariate polynomial coefficients and remainder term equal to those in variable var, possibly defined in another Taylor model environment with less variables or with a different expansion order. Coefficients involving other variables or higher order are initialized to 0 if reset=true (default), otherwise they are left unmodified. Higher-order terms in TV are bounded and added to the remainder bound.
 
virtual PolyVar< T > & get (PolyVar< T > &var, const bool reset=false)
 Copy multivariate polynomial coefficients from current variable into variable var, possibly defined in another polynomial model environment with less variables or with a lower expansion order. Copied coefficients are reset to 0 in current Taylor variable if reset=true, otherwise they are left unmodified (default).
 
virtual PolyModelenv () const
 Get pointer to associated polynomial model environment.
 
virtual T bound (const int type) const
 Compute bound on variable using bounder type
 
bound () const
 Retreive bound on variable using default bounder.
 
bndpol () const
 Retreive bound on multivariate polynomial using default bounder.
 
bndord (const unsigned int iord) const
 Retreive bound on all terms with (total) order iord in polynomial model.
 
remainder () const
 Return remainder term of variable.
 
virtual T B (const int type) const
 Shortcut to mc::PolyVar::bound.
 
virtual T B () const
 Shortcut to mc::PolyVar::bound.
 
R () const
 Shortcut to mc::PolyVar::remainder.
 
double coefmon (const unsigned int *iexp) const
 Get (possibly scaled) coefficient in monomial term with variable exponents as given in iexp
 
std::pair< unsigned int, const
double * > 
coefmon () const
 Get pair of size of, and const pointer to, array of (possibly scaled) monomial coefficients in multivariate polynomial of Taylor variable.
 
std::pair< unsigned int, const
unsigned int * > 
expmon () const
 Get pair of size of, and const pointer to, array of monomial exponents in multivariate polynomial of Taylor variable.
 
virtual PolyVar< T > & operator= (const PolyVar< T > &)
 Overloaded operator '=' for polynomial model variables.
 

Protected Member Functions

unsigned int _posord (const unsigned int iord) const
 Index of first monomial term of order iord in polynomial model.
 
const unsigned int * _expmon (const unsigned int imon) const
 Const pointer to array of size nvar of variable exponents in monomial term imon of polynomial model.
 
const unsigned int _loc_expmon (const unsigned int *iexp) const
 Index of monomial term whose variable exponents are the same as those in array iexp (of size nvar())
 
poly_size _get_binom (const unsigned int n, const unsigned int k) const
 Get binomial coefficient \(\left(\stackrel{n}{k}\right)\).
 
void _size (PolyModel *env)
 Initialize private/protected members of variable.
 
void _resize (PolyModel *env)
 Reinitialize private/protected members of variable.
 
void _cleanup ()
 Clean up private/protected members of variable.
 
PolyVar< T > & _set (const PolyVar< T > &var)
 Set variable equal to var
 
virtual void _center ()
 Center remainder error term _bndrem
 
virtual void _set_bndpol (const T &bndpol)
 Set polynomial bound in variable as bndpol
 
virtual void _set_bndpol (const T *bndpol)
 Set polynomial bound in variable as bndpol
 
virtual void _unset_bndpol ()
 Unset polynomial bound in variable.
 
virtual T _polybound (const int type) const =0
 Polynomial range bounder using specified bounder type (pure virtual)
 
virtual T _polybound () const =0
 Polynomial range bounder using specified bounder type (pure virtual)
 
virtual void _update_bndord () const =0
 Update private/protected members of variable after manipulation the coefficients (pure virtual)
 

Protected Attributes

PolyModel_PM
 Pointer to corresponding polynomial model environment.
 
double * _coefmon
 Array of size _nmon with monomial coefficients of variable.
 
T * _bndord
 Array of size _nord+2 with bounds for all terms of degrees iord=0,...,_nord as well as the remainder bound at position _nord+1 of variable (possibly inaccurate - see _bndord_uptd)
 
bool _bndord_uptd
 Whether the bounds in bndord are up-to-date.
 
T * _bndrem
 Pointer to remainder bound of variable (possibly NULL if not computed)
 
T * _bndpol
 Pointer to polynomial bound of variable.
 

Detailed Description

template<typename T>
class mc::PolyVar< T >

mc::PolyVar is a C++ base class for definition of polynomial model variables.


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