USGS

Isis 3.0 Object Programmers' Reference

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 namespace Isis {
00059   class BasisFunction {
00060     public:
00061       BasisFunction(const std::string &name, int numVars, int numCoefs);
00063       virtual ~BasisFunction() {};
00064   
00065       void SetCoefficients(const std::vector<double> &coefs);
00066       double Evaluate (const std::vector<double> &vars);
00067       virtual void Expand(const std::vector<double> &vars);
00068 
00074       int Coefficients() const { return p_numCoefs; };
00080       int Variables() const { return p_numVars; };
00086       std::string Name() const { return p_name; };
00101       double Term(int c) const { return p_terms[c]; };
00109       double Coefficient(int i) const { return p_coefs[i]; };
00110   
00111     protected:
00113       std::string p_name;
00115       int p_numVars;
00119       int p_numCoefs;
00123       std::vector<double> p_coefs;
00127       std::vector<double> p_terms;
00128      
00129   };
00130 };
00131 
00132 #endif