Isis 3 Developer Reference
MultivariateStatistics.h
Go to the documentation of this file.
1 
24 #ifndef MultivariateStatistics_h
25 #define MultivariateStatistics_h
26 
27 #include "Constants.h"
28 #include "PvlObject.h"
29 #include "SpecialPixel.h"
30 #include "Statistics.h"
31 
32 namespace Isis {
33 
72  public:
74  MultivariateStatistics(const PvlObject &inStats);
76 
77  void Reset();
78  void AddData(const double *x, const double *y,
79  const unsigned int count);
80  void AddData(double x, double y, unsigned int count = 1);
81  void RemoveData(const double *x, const double *y,
82  const unsigned int count);
83 
84  Isis::Statistics X() const;
85  Isis::Statistics Y() const;
86  double SumXY() const;
87  double Covariance() const;
88  double Correlation() const;
89 
90  void LinearRegression(double &a, double &b) const;
91 
92  BigInt ValidPixels() const;
93  BigInt InvalidPixels() const;
94  BigInt TotalPixels() const;
95 
96  PvlObject toPvl(QString name = "MultivariateStatistics") const;
97 
98  private:
99 
100  void fromPvl(const PvlObject &inStats);
101 
103  Isis::Statistics p_x;
105  Isis::Statistics p_y;
106 
108  double p_sumxy;
113  BigInt p_validPixels;
118  BigInt p_invalidPixels;
123  BigInt p_totalPixels;
124  };
125 };
126 
127 #endif
long long int BigInt
Big int.
Definition: Constants.h:65
Isis::Statistics Y() const
Returns a Stats object for all of the Y data fed through the AddData method.
Definition: MultivariateStatistics.cpp:278
void LinearRegression(double &a, double &b) const
Fits a line through the data.
Definition: MultivariateStatistics.cpp:238
double Covariance() const
Computes and returns the covariance between the two data sets If there are no valid data (pixels) the...
Definition: MultivariateStatistics.cpp:169
BigInt TotalPixels() const
Returns the total number of pixels processed.
Definition: MultivariateStatistics.cpp:205
BigInt ValidPixels() const
Returns the number of valid pixels processed.
Definition: MultivariateStatistics.cpp:217
~MultivariateStatistics()
Destructs a MultivariateStatistics object.
Definition: MultivariateStatistics.cpp:70
MultivariateStatistics()
Constructs a Multivariate Statistics object with accumulators and counters set to zero...
Definition: MultivariateStatistics.cpp:41
PvlObject toPvl(QString name="MultivariateStatistics") const
Serializes a multivariate statistics object as a PvlObject.
Definition: MultivariateStatistics.cpp:309
Isis::Statistics X() const
Returns a Stats object for all of the X data fed through the AddData method.
Definition: MultivariateStatistics.cpp:268
double Correlation() const
Computes and returns the coefficient of correlation (between -1.0 and 1.0) of the two data sets...
Definition: MultivariateStatistics.cpp:187
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:107
Container of multivariate statistics.
Definition: MultivariateStatistics.h:71
BigInt InvalidPixels() const
Returns the number of invalid pixels encountered.
Definition: MultivariateStatistics.cpp:227
void RemoveData(const double *x, const double *y, const unsigned int count)
Remove an array of doubles from the accumulators and counters.
Definition: MultivariateStatistics.cpp:140
void Reset()
Resets all accumulators to zero.
Definition: MultivariateStatistics.cpp:58
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void AddData(const double *x, const double *y, const unsigned int count)
Add two arrays of doubles to the accumulators and counters.
Definition: MultivariateStatistics.cpp:82
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
double SumXY() const
Returns the sum of x*y for all data given through the AddData method.
Definition: MultivariateStatistics.cpp:258