

Definition at line 52 of file nmrPolynomialBase.h.
| virtual ValueType nmrPolynomialBase::EvaluateBasis | ( | const nmrPolynomialTermPowerIndex & | where, | |
| const nmrMultiVariablePowerBasis & | variables | |||
| ) | const [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.
Referenced by nmrPolynomialContainer< void * >::EvaluateBasisVector(), and nmrPolynomialContainer< void * >::EvaluateTerm().
| ValueType nmrPolynomialBase::EvaluateTerm | ( | const nmrPolynomialTermPowerIndex & | where, | |
| const nmrMultiVariablePowerBasis & | variables | |||
| ) | const [inline] |
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.
Definition at line 305 of file nmrPolynomialBase.h.
Referenced by nmrPolynomialContainer< void * >::Evaluate().
| ValueType nmrPolynomialBase::EvaluateTerm | ( | const nmrPolynomialTermPowerIndex & | where, | |
| const nmrMultiVariablePowerBasis & | variables, | |||
| CoefficientType | coefficient | |||
| ) | const [inline] |
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.
Definition at line 316 of file nmrPolynomialBase.h.
| virtual void nmrPolynomialBase::EvaluateBasisVector | ( | const nmrMultiVariablePowerBasis & | variables, | |
| ValueType | termBaseValues[] | |||
| ) | const [pure virtual] |
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.
| virtual ValueType nmrPolynomialBase::EvaluateForCoefficients | ( | const nmrMultiVariablePowerBasis & | variables, | |
| const CoefficientType | coefficients[] | |||
| ) | const [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()
| virtual ValueType nmrPolynomialBase::Evaluate | ( | const nmrMultiVariablePowerBasis & | variables | ) | const [pure virtual] |
Evaluate the polynomial for externally given variables
| virtual void nmrPolynomialBase::Scale | ( | CoefficientType | scaleFactor | ) | [pure virtual] |
Scale the polynomial by a given scalar value. Basically, it means multiplying all the term coefficient by the scale factor.
| 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. |
The same rules that apply to evaluating the polynomial for external coefficients apply here as well.
the function is declared as deprecated. Generally, using the Multiply operation on cisstVector containers of coefficients should be prefered.
| virtual void nmrPolynomialBase::AddConstant | ( | CoefficientType | shiftAmount | ) | [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
| virtual void nmrPolynomialBase::AddConstantToCoefficients | ( | CoefficientType | coefficients[], | |
| CoefficientType | shiftAmount | |||
| ) | const [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
The current implementations assert that this polynomial and the external coefficients meet the preconditions for the operation. That is, we do not throw an exception but rather issue an assertion error.
| virtual void nmrPolynomialBase::SerializeRaw | ( | std::ostream & | output | ) | const [virtual] |
Serialize NumVariables, MinDegree, MaxDegree
Reimplemented in nmrPolynomialContainer< _TermInfo >, and nmrPolynomialContainer< void * >.
| virtual void nmrPolynomialBase::DeserializeRaw | ( | std::istream & | input | ) | [virtual] |
Deserialize NumVariables, MinDegree, MaxDegree