|
cisst-saw
|
#include <nmrPolynomialBase.h>
Public Types | |
| enum | InsertStatus { INSERT_FAIL = -1 , INSERT_NEW = 0 , INSERT_REPLACE = 1 } |
| typedef double | ValueType |
| typedef double | VariableType |
| typedef double | CoefficientType |
| typedef nmrPolynomialTermPowerIndex::VariableIndexType | VariableIndexType |
| typedef nmrPolynomialTermPowerIndex::PowerType | PowerType |
| typedef nmrPolynomialTermPowerIndex::MultinomialCoefficientType | TermCounterType |
Protected Attributes | |
| VariableIndexType | NumVariables |
| PowerType | MinDegree |
| PowerType | MaxDegree |
| typedef double nmrPolynomialBase::CoefficientType |
| typedef double nmrPolynomialBase::ValueType |
| typedef double nmrPolynomialBase::VariableType |
| nmrPolynomialBase::nmrPolynomialBase | ( | VariableIndexType | numVariables, |
| PowerType | minDegree, | ||
| PowerType | maxDegree ) |
|
inlinevirtual |
|
pure virtual |
Add a constant value to this polynomial. That is, if p is a polynomial and s is a constant then the following returns true: ValueType v0 = p.Evaluate(); p.AddConstant(s); ValueType v1 = p.Evaluate(); v1 - v0 == s // up to floating point precision error
Implemented in nmrPolynomialContainer< _TermInfo >, nmrPolynomialContainer< void * >, and nmrStandardPolynomial.
|
pure virtual |
Modify external coefficients so that they evaluate a new polynomial shifted by a constant amount. That is, if p is a polynomial, c is an array of external coefficients, and s is a constant, the following returns true: ValueType v0 = p.EvaluateForCoefficients(c); p.AddConstantToCoefficients(c, s); ValueType v1 = p.EvaluateForCoefficients(c); v1 - v0 == s; // up to floating point precision error
Implemented in nmrPolynomialContainer< _TermInfo >, nmrPolynomialContainer< void * >, and nmrStandardPolynomial.
| bool nmrPolynomialBase::CanIncludeIndex | ( | const nmrPolynomialTermPowerIndex & | term | ) | const |
|
pure virtual |
Implemented in nmrPolynomialContainer< _TermInfo >, nmrPolynomialContainer< void * >, and nmrStandardPolynomial.
|
pure virtual |
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
virtual |
Deserialize NumVariables, MinDegree, MaxDegree
Reimplemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
pure virtual |
Evaluate the polynomial for externally given variables
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
pure virtual |
Evaluate the basis function for a term. The term is regarded as a list of powers, without any user defined coefficient. However, for different families of polynomial the set of basis functions are different. For example, Bezier polynomials have the multinomial coefficient in addition to each user defined coefficient. Implemented for each concrete polynomial class.
Implemented in nmrStandardPolynomial.
|
pure virtual |
Evaluate a single term at the point specified by the `variables' argument, including the basis function and the term's coefficient. This function uses the internally stored coefficient. */ ValueType EvaluateTerm(const nmrPolynomialTermPowerIndex & where, const nmrMultiVariablePowerBasis & variables) const { CoefficientType coefficient = GetCoefficient(where); return EvaluateTerm(where, variables, coefficient); }
/*! Evaluate a single term at the point specified by the `variables' argument, including the basis function and the term's coefficient. This function takes the coefficient as a parameter. */ ValueType EvaluateTerm(const nmrPolynomialTermPowerIndex & where, const nmrMultiVariablePowerBasis & variables, CoefficientType coefficient) const { if (coefficient == 0) return 0; return coefficient * EvaluateBasis(where, variables); }
/*! Evaluate the basis vector for extrnally given variables. Evaluate the basis function for each terms in the polynomial, and store the results into an array of termBaseValues.
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
pure virtual |
Evaluate the polynomial at the currently specified point, using externally defined coefficients. This lets the user create many polynomials over the same set of basis functions without having to duplicate the terms. The input coefficients must be ordered the same way as the terms in this object. It is best to order them using CollectCoefficients()
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
pure virtual |
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
inlinevirtual |
|
pure virtual |
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
inline |
|
inline |
|
inline |
|
pure virtual |
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
inline |
|
pure virtual |
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
pure virtual |
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
pure virtual |
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
pure virtual |
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
pure virtual |
Scale the polynomial by a given scalar value. Basically, it means multiplying all the term coefficient by the scale factor.
Implemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
| void CISST_DEPRECATED nmrPolynomialBase::ScaleCoefficients | ( | CoefficientType | coefficients[], |
| CoefficientType | scaleFactor ) const |
Scale a given set of external coefficients which correspond to the terms of this polynomial. Basically, it means multiplying them all by the scale factor.
| coefficients | [i/o] the external coefficients to be scales (in place). |
| scaleFactor | the scaling factor. |
|
virtual |
Serialize NumVariables, MinDegree, MaxDegree
Reimplemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
|
pure virtual |
Implemented in nmrPolynomialContainer< _TermInfo >, nmrPolynomialContainer< void * >, and nmrStandardPolynomial.
|
protected |
|
protected |
|
protected |