83 const unsigned int count) {
84 for(
unsigned int i = 0; i < count; i++) {
117 for (
unsigned int i = 0; i < count; i++) {
141 const unsigned int count) {
142 for(
unsigned int i = 0; i < count; i++) {
157 std::string m =
"You are removing non-existant data in [MultivariateStatistics::RemoveData]";
193 if(stdX == 0.0 || stdX == Isis::NULL8)
return Isis::NULL8;
194 if(stdY == 0.0 || stdY == Isis::NULL8)
return Isis::NULL8;
195 if(covar == Isis::NULL8)
return Isis::NULL8;
196 return covar / (stdX * stdY);
242 std::string msg =
"Unable to compute linear regression in Multivariate Statistics";
310 if (name.isEmpty()) {
311 name =
"MultivariateStatistics";
void RemoveData(const double *data, const unsigned int count)
Remove an array of doubles from the accumulators and counters.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
BigInt p_invalidPixels
The number of invalid (ignored) pixels.
double p_sumxy
The sum of x and y.
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
double Correlation() const
Computes and returns the coefficient of correlation (between -1.0 and 1.0) of the two data sets...
~MultivariateStatistics()
Destructs a MultivariateStatistics object.
MultivariateStatistics()
Constructs a Multivariate Statistics object with accumulators and counters set to zero...
void LinearRegression(double &a, double &b) const
Fits a line through the data.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
bool IsValidPixel(const double d)
Returns if the input pixel is valid.
PvlGroup toPvl(QString name="Statistics") const
Serialize statistics as a pvl group.
This error is for when a programmer made an API call that was illegal.
double SumXY() const
Returns the sum of x*y for all data given through the AddData method.
double StandardDeviation() const
Computes and returns the standard deviation.
Isis::Statistics p_x
A Statistics object holding x data.
double Sum() const
Returns the sum of all the data.
This class is used to accumulate statistics on double arrays.
BigInt p_totalPixels
The total number of pixels (invalid and valid).
Contains multiple PvlContainers.
Isis::Statistics p_y
A Statistics object holding y data.
double Average() const
Computes and returns the average.
void Reset()
Reset all accumulators and counters to zero.
#define _FILEINFO_
Macro for the filename and line number.
double Covariance() const
Computes and returns the covariance between the two data sets If there are no valid data (pixels) the...
A single keyword-value pair.
PvlObject toPvl(QString name="MultivariateStatistics") const
Serializes a multivariate statistics object as a PvlObject.
BigInt InvalidPixels() const
Returns the number of invalid pixels encountered.
BigInt p_validPixels
The number of valid (computed) pixels.
double SumSquare() const
Returns the sum of all the squared data.
Isis::Statistics X() const
Returns a Stats object for all of the X data fed through the AddData method.
BigInt TotalPixels() const
Returns the total number of pixels processed.
Isis::Statistics Y() const
Returns a Stats object for all of the Y data fed through the AddData method.
void RemoveData(const double *x, const double *y, const unsigned int count)
Remove an array of doubles from the accumulators and counters.
void Reset()
Resets all accumulators to zero.
void fromPvl(const PvlObject &inStats)
Unserializes a multivariate statistics object from a PvlObject.
void AddData(const double *x, const double *y, const unsigned int count)
Add two arrays of doubles to the accumulators and counters.
BigInt ValidPixels() const
Returns the number of valid pixels processed.
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
Contains Pvl Groups and Pvl Objects.