Isis Developer Reference
|
NthOrderPolynomial basis function. More...
#include <NthOrderPolynomial.h>
Public Member Functions | |
NthOrderPolynomial (int degree) | |
Create an NthOrderPolynomial. | |
~NthOrderPolynomial () | |
Destroys the NthOrderPolynomial object. | |
void | Expand (const std::vector< double > &vars) |
This is the the overriding virtual function that provides the expansion into the nth order polynomial equation. | |
void | SetCoefficients (const std::vector< double > &coefs) |
Set the coefficients for the equation. | |
double | Evaluate (const std::vector< double > &vars) |
Compute the equation using the input variables. | |
double | Evaluate (const double &var) |
Compute the equation using the input variable. | |
int | Coefficients () const |
Returns the number of coefficients for the equation. | |
int | Variables () const |
Returns the number of variables in the equation. | |
QString | Name () const |
Returns the name of the equation. | |
double | Term (int c) const |
Returns the cth term. | |
double | Coefficient (int i) const |
Returns the ith coefficient. | |
Protected Attributes | |
QString | p_name |
The name of the equation. Call it by using Name() | |
int | p_numVars |
The number of variables in the equation. Call it by using Variables() | |
int | p_numCoefs |
The number of coefficients in the equation. | |
std::vector< double > | p_coefs |
A vector of the coefficients in the equation. | |
std::vector< double > | p_terms |
A vector of the terms in the equation. | |
NthOrderPolynomial basis function.
This is a derived class from the BasisFunction class which creates an nth order polynomial.
Isis::NthOrderPolynomial::NthOrderPolynomial | ( | int | degree | ) |
Create an NthOrderPolynomial.
degree | The order/degree of the polynomial |
|
inline |
Destroys the NthOrderPolynomial object.
|
inlineinherited |
Returns the ith coefficient.
i | The index for the desired coefficient. |
References Isis::BasisFunction::p_coefs.
Referenced by Isis::PolynomialUnivariate::DerivativeVar(), Isis::SurfaceModel::MinMax(), and Isis::OverlapNormalization::Solve().
|
inlineinherited |
Returns the number of coefficients for the equation.
References Isis::BasisFunction::p_numCoefs.
Referenced by Isis::PolynomialUnivariate::DerivativeCoef(), Isis::PolynomialUnivariate::DerivativeVar(), and Isis::OverlapNormalization::Solve().
|
inherited |
Compute the equation using the input variable.
var | A single double value to use for the equation. |
References Isis::BasisFunction::Evaluate().
|
inherited |
Compute the equation using the input variables.
vars | A vector of double values to use for the equation. After setting the coefficients, this can be invoked many times to compute output values given input values. |
References _FILEINFO_, Isis::BasisFunction::Expand(), Isis::BasisFunction::p_coefs, Isis::BasisFunction::p_numCoefs, Isis::BasisFunction::p_numVars, Isis::BasisFunction::p_terms, Isis::IException::Programmer, and Isis::toString().
Referenced by Isis::BasisFunction::Evaluate(), and Isis::LeastSquares::Evaluate().
|
virtual |
This is the the overriding virtual function that provides the expansion into the nth order polynomial equation.
See BasisFunction for more information.
vars | A vector of double values to use for the expansion. |
Reimplemented from Isis::BasisFunction.
References _FILEINFO_, Isis::BasisFunction::p_terms, Isis::IException::Programmer, and Isis::BasisFunction::Variables().
|
inlineinherited |
Returns the name of the equation.
References Isis::BasisFunction::p_name.
Referenced by Isis::LeastSquares::AddKnown().
|
inherited |
Set the coefficients for the equation.
coefs | A vector of coefficients for the equation. |
References _FILEINFO_, Isis::BasisFunction::p_coefs, Isis::BasisFunction::p_numCoefs, Isis::IException::Programmer, and Isis::toString().
Referenced by Isis::SpiceRotation::DCJdt(), and Isis::PolynomialUnivariate::PolynomialUnivariate().
|
inlineinherited |
Returns the cth term.
This is only valid after a Evalute/Expand has been invoked. It represents the expansion of the variables into the ith term. For example,
\[ x = C1 + C2*x + C3*y + C4*x*y \]
would return x*y for the 3rd term (zero-based)
c | The index for the desired coefficient. |
References Isis::BasisFunction::p_terms.
|
inlineinherited |
Returns the number of variables in the equation.
References Isis::BasisFunction::p_numVars.
Referenced by Isis::LeastSquares::AddKnown(), and Expand().
|
protectedinherited |
A vector of the coefficients in the equation.
Call it by using Coefficient()
Referenced by Isis::BasisFunction::Coefficient(), Isis::BasisFunction::Evaluate(), and Isis::BasisFunction::SetCoefficients().
|
protectedinherited |
The name of the equation. Call it by using Name()
Referenced by Isis::BasisFunction::BasisFunction(), and Isis::BasisFunction::Name().
|
protectedinherited |
The number of coefficients in the equation.
Call it by using Coefficients()
Referenced by Isis::BasisFunction::BasisFunction(), Isis::BasisFunction::Coefficients(), Isis::BasisFunction::Evaluate(), and Isis::BasisFunction::SetCoefficients().
|
protectedinherited |
The number of variables in the equation. Call it by using Variables()
Referenced by Isis::BasisFunction::BasisFunction(), Isis::BasisFunction::Evaluate(), and Isis::BasisFunction::Variables().
|
protectedinherited |
A vector of the terms in the equation.
Call it by using Term()
Referenced by Isis::BasisFunction::Evaluate(), Isis::BasisFunction::Expand(), Expand(), Isis::PolynomialBivariate::Expand(), Isis::PolynomialUnivariate::Expand(), and Isis::BasisFunction::Term().