Isis 3.0
Home
Isis::Parabola Class Reference

Parabola basis function. More...

#include <Parabola.h>

Inherits Isis::BasisFunction.

Public Member Functions

 Parabola (const QString &bname="Parabola")
 Create a Parabola object. More...
 
 ~Parabola ()
 Destroys the Parabola object. More...
 
void Expand (const std::vector< double > &vars)
 This is the the overriding virtual function that provides the expansion into the parabolic equation. More...
 
void SetCoefficients (const std::vector< double > &coefs)
 Set the coefficients for the equation. More...
 
double Evaluate (const std::vector< double > &vars)
 Compute the equation using the input variables. More...
 
double Evaluate (const double &var)
 Compute the equation using the input variable. More...
 
int Coefficients () const
 Returns the number of coefficients for the equation. More...
 
int Variables () const
 Returns the number of variables in the equation. More...
 
QString Name () const
 Returns the name of the equation. More...
 
double Term (int c) const
 Returns the cth term. More...
 
double Coefficient (int i) const
 Returns the ith coefficient. More...
 

Protected Attributes

QString p_name
 The name of the equation. Call it by using Name() More...
 
int p_numVars
 The number of variables in the equation. Call it by using Variables() More...
 
int p_numCoefs
 The number of coefficients in the equation. More...
 
std::vector< double > p_coefs
 A vector of the coefficients in the equation. More...
 
std::vector< double > p_terms
 A vector of the terms in the equation. More...
 

Detailed Description

Parabola basis function.

This is a derived class from the BasisFunction class which creates a parabola (second degree equation in 1 variable). The parabolic function has the following form:

\[ x = A + B*y + C*y**2 \]

Author
2005-06-09 Kris Becker

Constructor & Destructor Documentation

Isis::Parabola::Parabola ( const QString &  bname = "Parabola")
inline

Create a Parabola object.

Isis::Parabola::~Parabola ( )
inline

Destroys the Parabola object.

Member Function Documentation

double Isis::BasisFunction::Coefficient ( int  i) const
inlineinherited
int Isis::BasisFunction::Coefficients ( ) const
inlineinherited

Returns the number of coefficients for the equation.

Returns
The number of coefficients.

References Isis::BasisFunction::p_numCoefs.

Referenced by Isis::PolynomialUnivariate::DerivativeCoef(), Isis::PolynomialUnivariate::DerivativeVar(), Isis::SpicePosition::SetPolynomial(), and Isis::SpiceRotation::SetPolynomial().

double Isis::BasisFunction::Evaluate ( const std::vector< double > &  vars)
inherited

Compute the equation using the input variables.

Parameters
varsA 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.
Returns
The output value.

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(), Isis::LeastSquares::Evaluate(), Isis::SpiceRotation::EvaluatePolyFunction(), Isis::SpicePosition::LoadHermiteCache(), Isis::SpicePosition::SetEphemerisTimePolyFunction(), and Isis::SpiceRotation::setEphemerisTimePolyFunction().

double Isis::BasisFunction::Evaluate ( const double &  var)
inherited

Compute the equation using the input variable.

Parameters
varA single double value to use for the equation.
Returns
The output double value resulting from the equation.

References Isis::BasisFunction::Evaluate().

void Isis::Parabola::Expand ( const std::vector< double > &  vars)
virtual

This is the the overriding virtual function that provides the expansion into the parabolic equation.

See BasisFunction for more information.

Parameters
varsA vector of double values to use for the expansion.

Reimplemented from Isis::BasisFunction.

References Isis::BasisFunction::p_terms, and Isis::BasisFunction::Variables().

QString Isis::BasisFunction::Name ( ) const
inlineinherited

Returns the name of the equation.

Returns
The name of the equation.

References Isis::BasisFunction::p_name.

Referenced by Isis::LeastSquares::AddKnown().

double Isis::BasisFunction::Term ( int  c) const
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)

Parameters
cThe index for the desired coefficient.
Returns
The cth term.

References Isis::BasisFunction::p_terms.

int Isis::BasisFunction::Variables ( ) const
inlineinherited

Returns the number of variables in the equation.

Returns
The number of variables.

References Isis::BasisFunction::p_numVars.

Referenced by Isis::LeastSquares::AddKnown(), and Expand().

Member Data Documentation

std::vector<double> Isis::BasisFunction::p_coefs
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().

QString Isis::BasisFunction::p_name
protectedinherited

The name of the equation. Call it by using Name()

Referenced by Isis::BasisFunction::BasisFunction(), and Isis::BasisFunction::Name().

int Isis::BasisFunction::p_numCoefs
protectedinherited
int Isis::BasisFunction::p_numVars
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().

std::vector<double> Isis::BasisFunction::p_terms
protectedinherited

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