|
Isis 3 Programmer Reference
|
7 #ifndef BasisFunction_h
8 #define BasisFunction_h
50 BasisFunction(
const QString &name,
int numVars,
int numCoefs);
55 double Evaluate(
const std::vector<double> &vars);
57 virtual void Expand(
const std::vector<double> &vars);
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()
void SetCoefficients(const std::vector< double > &coefs)
Set the coefficients for the equation.
Generic linear equation class.
double Term(int c) const
Returns the cth term.
QString Name() const
Returns the name of the equation.
std::vector< double > p_coefs
A vector of the coefficients in the equation.
BasisFunction(const QString &name, int numVars, int numCoefs)
Creates a BasisFunction object.
virtual void Expand(const std::vector< double > &vars)
This is the function you should replace depending on your needs.
int p_numCoefs
The number of coefficients in the equation.
int Variables() const
Returns the number of variables in the equation.
std::vector< double > p_terms
A vector of the terms in the equation.
double Evaluate(const std::vector< double > &vars)
Compute the equation using the input variables.
virtual ~BasisFunction()
Destroys the BasisFunction object.
This is free and unencumbered software released into the public domain.
int Coefficients() const
Returns the number of coefficients for the equation.
double Coefficient(int i) const
Returns the ith coefficient.