]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RALICE/AliSample.h
18-feb-2005 NvE Copyright format modified in all .cxx source files in line with Ralice
[u/mrichter/AliRoot.git] / RALICE / AliSample.h
index 09a945721507f468859d07f54c22e2fbf41f229f..d9c960fee2dde1f76383a079c1e5d6a867ec0880 100644 (file)
@@ -3,36 +3,9 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-/* $Id$ */
+// $Id$
 
-///////////////////////////////////////////////////////////////////////////
-// Class AliSample
-// 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 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 index convention for a data point (x,y) is : x=1  y=2
-//
-// Example :
-// ---------
-// For an AliSample s a data point (x,y) can be entered as s.Enter(x,y) and
-// 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().
-//
-//--- NvE 30-mar-1996 CERN Geneva
-///////////////////////////////////////////////////////////////////////////
 #include <math.h>
-#include <iostream.h>
 
 #include "Rtypes.h"
  
@@ -48,17 +21,17 @@ class AliSample
   void Remove(Float_t x, Float_t y);            // Remove value from 2-dim. sample
   void Enter(Float_t x, Float_t y, Float_t z);  // Enter value for 3-dim. sample
   void Remove(Float_t x, Float_t y, Float_t z); // Remove value from 3-dim. sample
-  Int_t GetDimension();                         // Provide dimension of the sample
-  Int_t GetN();                                 // Provide the number of entries
-  Float_t GetSum(Int_t i);                      // Provide sum for i-th variable
-  Float_t GetMean(Int_t i);                     // Provide mean for i-th variable
-  Float_t GetVar(Int_t i);                      // Provide variance for i-th variable
-  Float_t GetSigma(Int_t i);                    // Standard deviation for i-th variable
-  Float_t GetCov(Int_t i, Int_t j);             // Covariance for i-th and j-th variable
-  Float_t GetCor(Int_t i, Int_t j);             // Correlation for i-th and j-th variable
-  void Info();                                  // Stat. info for the complete sample
-  void Info(Int_t i);                           // Stat. info for the i-th variable
-  void Info(Int_t i, Int_t j);                  // Stat. info for i-th and j-th variable
+  Int_t GetDimension() const;                   // Provide dimension of the sample
+  Int_t GetN() const;                           // Provide the number of entries
+  Float_t GetSum(Int_t i) const;                // Provide sum for i-th variable
+  Float_t GetMean(Int_t i) const;               // Provide mean for i-th variable
+  Float_t GetVar(Int_t i) const;                // Provide variance for i-th variable
+  Float_t GetSigma(Int_t i) const;              // Standard deviation for i-th variable
+  Float_t GetCov(Int_t i, Int_t j) const;       // Covariance for i-th and j-th variable
+  Float_t GetCor(Int_t i, Int_t j) const;       // Correlation for i-th and j-th variable
+  void Data() const;                            // Stat. info for the complete sample
+  void Data(Int_t i) const;                     // Stat. info for the i-th variable
+  void Data(Int_t i, Int_t j) const;            // Stat. info for i-th and j-th variable
  
  private:
   Int_t fDim;                      // Dimension of the sample
@@ -73,5 +46,7 @@ class AliSample
   Float_t fSigma[fMaxdim];         // Standard deviation for each variable
   Float_t fCov[fMaxdim][fMaxdim];  // Covariances of pairs of variables
   Float_t fCor[fMaxdim][fMaxdim];  // Correlations of pairs of variables
+
+ ClassDef(AliSample,0) // Statistics tools for various multi-dimensional data samples.
 };
 #endif