npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
BinnedADTest1D.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_BINNEDADTEST1D_HH_
2 #define NPSTAT_BINNEDADTEST1D_HH_
3 
4 /*!
5 // \file BinnedADTest1D.hh
6 //
7 // \brief Binned version of the Anderson-Darling test
8 //
9 // Author: I. Volobouev
10 //
11 // May 2014
12 */
13 
14 #include <string>
15 
17 
18 namespace npstat {
20  {
21  public:
22  /**
23  // If either rng pointer is NULL or mcSamplesForPValue is 0
24  // then theoretical formulae are used as if the samples are
25  // unbinned.
26  */
27  BinnedADTest1D(bool useTwoSampleTest, AbsRandomGenerator* rng,
28  unsigned mcSamplesForPValue = 10000U);
29 
30  inline virtual ~BinnedADTest1D() {}
31 
32  virtual const char* name() const;
33 
34  private:
35  virtual void compareD(const double* data, const double* reference,
36  unsigned len, double* distance,
37  double* pvalue) const;
38 
39  mutable std::string name_;
40  AbsRandomGenerator* rng_;
41  unsigned mcSamples_;
42  bool twoSampleTest_;
43  };
44 }
45 
46 #endif // NPSTAT_BINNEDADTEST1D_HH_
Interface definition for comparing binned samples and/or densities.
Definition: AbsBinnedComparison1D.hh:22
Definition: BinnedADTest1D.hh:20
virtual const char * name() const
BinnedADTest1D(bool useTwoSampleTest, AbsRandomGenerator *rng, unsigned mcSamplesForPValue=10000U)
Definition: AbsArrayProjector.hh:14
Definition: AbsRandomGenerator.hh:27