Probability.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2007 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Util/genutil/Probability.h
10 
11 #ifndef __Probability_h
12 #define __Probability_h
13 
15 class Probability {
16 
17  public:
18 
19  virtual ~Probability () {}
20 
22  virtual double density (double x) = 0;
23 
25 
26  virtual double cumulative_distribution (double x) = 0;
27 
29  virtual double cumulative_mean (double x) = 0;
30 
32  virtual double cumulative_moment2 (double x) = 0;
33 
35  virtual double mean (double x1, double x2);
36 
38  virtual double moment2 (double x1, double x2);
39 
40 
41 };
42 
43 #endif
44 
virtual double density(double x)=0
Get the value of the probability density at x.
Template class manages Reference::Able objects.
Definition: Reference.h:74
static void children(std::vector< Reference::To< Predictor > > &)
Factory helper creates a vector of pointers to derived class instances.
Definition: Predictor_children.C:22
Functions that predict pulse phase.
Definition: T2Predictor.h:31
Base class of probability density functions.
Definition: Probability.h:15
virtual double moment2(double x1, double x2)
Get the second moment of the distribution averaged from x1 to x2.
Definition: Probability.C:20
virtual double mean(double x1, double x2)
Get the first moment of the distribution averaged from x1 to x2.
Definition: Probability.C:11
virtual double cumulative_mean(double x)=0
Get the first moment of the distribution averaged from -inf to x.
Simple pulse phase model.
Definition: SimplePredictor.h:29
virtual double cumulative_moment2(double x)=0
Get the second moment of the distribution averaged from -inf to x.
Implements Predictor class for Tempo.
Definition: polyco.h:202
virtual double cumulative_distribution(double x)=0
Get the value of the distribution function at x.

Generated using doxygen 1.8.17