|
Isis Developer Reference
|
Go to the documentation of this file.
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()
Definition: BasisFunction.h:109
int p_numVars
The number of variables in the equation. Call it by using Variables()
Definition: BasisFunction.h:115
void SetCoefficients(const std::vector< double > &coefs)
Set the coefficients for the equation.
Definition: BasisFunction.cpp:42
Generic linear equation class.
Definition: BasisFunction.h:48
double Term(int c) const
Returns the cth term.
Definition: BasisFunction.h:97
QString Name() const
Returns the name of the equation.
Definition: BasisFunction.h:80
std::vector< double > p_coefs
A vector of the coefficients in the equation.
Definition: BasisFunction.h:123
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
BasisFunction(const QString &name, int numVars, int numCoefs)
Creates a BasisFunction object.
Definition: BasisFunction.cpp:29
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
virtual void Expand(const std::vector< double > &vars)
This is the function you should replace depending on your needs.
Definition: BasisFunction.cpp:123
Isis exception class.
Definition: IException.h:91
int p_numCoefs
The number of coefficients in the equation.
Definition: BasisFunction.h:119
int Variables() const
Returns the number of variables in the equation.
Definition: BasisFunction.h:72
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
std::vector< double > p_terms
A vector of the terms in the equation.
Definition: BasisFunction.h:127
double Evaluate(const std::vector< double > &vars)
Compute the equation using the input variables.
Definition: BasisFunction.cpp:64
virtual ~BasisFunction()
Destroys the BasisFunction object.
Definition: BasisFunction.h:52
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
int Coefficients() const
Returns the number of coefficients for the equation.
Definition: BasisFunction.h:64
double Coefficient(int i) const
Returns the ith coefficient.
Definition: BasisFunction.h:107