USGS

Isis 3.0 Developer's Reference (API)

Home

BasisFunction.h

Go to the documentation of this file.
00001 
00023 #ifndef BasisFunction_h
00024 #define BasisFunction_h
00025 
00026 #include <vector>
00027 #include <string>
00028 
00029 #include <QString>
00030 
00031 namespace Isis {
00061   class BasisFunction {
00062     public:
00063       BasisFunction(const QString &name, int numVars, int numCoefs);
00065       virtual ~BasisFunction() {};
00066 
00067       void SetCoefficients(const std::vector<double> &coefs);
00068       double Evaluate(const std::vector<double> &vars);
00069       virtual void Expand(const std::vector<double> &vars);
00070 
00076       int Coefficients() const {
00077         return p_numCoefs;
00078       };
00084       int Variables() const {
00085         return p_numVars;
00086       };
00092       QString Name() const {
00093         return p_name;
00094       };
00109       double Term(int c) const {
00110         return p_terms[c];
00111       };
00119       double Coefficient(int i) const {
00120         return p_coefs[i];
00121       };
00122 
00123     protected:
00125       QString p_name;
00127       int p_numVars;
00131       int p_numCoefs;
00135       std::vector<double> p_coefs;
00139       std::vector<double> p_terms;
00140 
00141   };
00142 };
00143 
00144 #endif