USGS

Isis 3.0 Developer's Reference (API)

Home

MultivariateStatistics.h

Go to the documentation of this file.
00001 
00024 #ifndef MultivariateStatistics_h
00025 #define MultivariateStatistics_h
00026 
00027 #include "Statistics.h"
00028 #include "SpecialPixel.h"
00029 #include "Constants.h"
00030 
00031 namespace Isis {
00065   class MultivariateStatistics {
00066     public:
00067       MultivariateStatistics();
00068       ~MultivariateStatistics();
00069 
00070       void Reset();
00071       void AddData(const double *x, const double *y,
00072                    const unsigned int count);
00073       void AddData(double x, double y, unsigned int count = 1);
00074       void RemoveData(const double *x, const double *y,
00075                       const unsigned int count);
00076 
00077       Isis::Statistics X() const;
00078       Isis::Statistics Y() const;
00079       double SumXY() const;
00080       double Covariance() const;
00081       double Correlation() const;
00082 
00083       void LinearRegression(double &a, double &b) const;
00084 
00085       BigInt ValidPixels() const;
00086       BigInt InvalidPixels() const;
00087       BigInt TotalPixels() const;
00088 
00089     private:
00091       Isis::Statistics p_x;
00093       Isis::Statistics p_y;
00094 
00096       double p_sumxy;
00101       BigInt p_validPixels;
00106       BigInt p_invalidPixels;
00111       BigInt p_totalPixels;
00112   };
00113 };
00114 
00115 #endif