///////////////////////////////////////////////////////////////////////////
// Class AliSample
-// Perform statistics on various multi-dimensional data samples
+// Perform statistics on various multi-dimensional data samples.
// A data sample can be filled using the "Enter" and/or "Remove" functions,
// whereas the "Reset" function resets the complete sample to 'empty'.
// The info which can be extracted from a certain data sample are the
// sum, mean, variance, sigma, covariance and correlation.
-// The "Info" function provides all statistics data for a certain sample.
+// The "Data" function provides all statistics data for a certain sample.
// The variables for which these stat. parameters have to be calculated
// are indicated by the index of the variable which is passed as an
// argument to the various member functions.
// the mean_x can be obtained as s.GetMean(1) whereas the mean_y is obtained
// via s.GetMean(2).
// The correlation between x and y is available via s.GetCor(1,2).
-// The x-statistics are obtained via s.Info(1), y-statistics via s.Info(2),
-// and the covariance and correlation between x and y via s.Info(1,2).
-// All statistics of a sample are obtained via s.Info().
+// The x-statistics are obtained via s.Data(1), y-statistics via s.Data(2),
+// and the covariance and correlation between x and y via s.Data(1,2).
+// All statistics of a sample are obtained via s.Data().
//
//--- Author: Nick van Eijndhoven 30-mar-1996 CERN Geneva
//- Modified: NvE $Date$ UU-SAP Utrecht
///////////////////////////////////////////////////////////////////////////
#include "AliSample.h"
+#include "Riostream.h"
+
+ClassImp(AliSample) // Class implementation to enable ROOT I/O
AliSample::AliSample()
{
}
}
///////////////////////////////////////////////////////////////////////////
-Int_t AliSample::GetDimension()
+Int_t AliSample::GetDimension() const
{
// Provide the dimension of a certain sample
return fDim;
}
///////////////////////////////////////////////////////////////////////////
-Int_t AliSample::GetN()
+Int_t AliSample::GetN() const
{
// Provide the number of entries of a certain sample
return fN;
}
///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetSum(Int_t i)
+Float_t AliSample::GetSum(Int_t i) const
{
// Provide the sum of a certain variable
if (fDim < i)
}
}
///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetMean(Int_t i)
+Float_t AliSample::GetMean(Int_t i) const
{
// Provide the mean of a certain variable
if (fDim < i)
}
}
///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetVar(Int_t i)
+Float_t AliSample::GetVar(Int_t i) const
{
// Provide the variance of a certain variable
if (fDim < i)
}
}
///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetSigma(Int_t i)
+Float_t AliSample::GetSigma(Int_t i) const
{
// Provide the standard deviation of a certain variable
if (fDim < i)
}
}
///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetCov(Int_t i,Int_t j)
+Float_t AliSample::GetCov(Int_t i,Int_t j) const
{
// Provide the covariance between variables i and j
if ((fDim < i) || (fDim < j))
}
}
///////////////////////////////////////////////////////////////////////////
-Float_t AliSample::GetCor(Int_t i,Int_t j)
+Float_t AliSample::GetCor(Int_t i,Int_t j) const
{
// Provide the correlation between variables i and j
if ((fDim < i) || (fDim < j))
}
}
///////////////////////////////////////////////////////////////////////////
-void AliSample::Info()
+void AliSample::Data() const
{
// Printing of statistics of all variables
for (Int_t i=0; i<fDim; i++)
}
}
///////////////////////////////////////////////////////////////////////////
-void AliSample::Info(Int_t i)
+void AliSample::Data(Int_t i) const
{
// Printing of statistics of ith variable
if (fDim < i)
{
- cout << " *AliSample::Info(i)* Error : Dimension less than " << i << endl;
+ cout << " *AliSample::Data(i)* Error : Dimension less than " << i << endl;
}
else
{
}
}
///////////////////////////////////////////////////////////////////////////
-void AliSample::Info(Int_t i,Int_t j)
+void AliSample::Data(Int_t i,Int_t j) const
{
// Printing of covariance and correlation between variables i and j
if ((fDim < i) || (fDim < j))
{
Int_t k=i;
if (j > i) k=j;
- cout << " *AliSample::Info(i,j)* Error : Dimension less than " << k << endl;
+ cout << " *AliSample::Data(i,j)* Error : Dimension less than " << k << endl;
}
else
{