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
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
Base class of probability density functions.
Definition Probability.h:15
virtual double cumulative_moment2(double x)=0
Get the second moment of the distribution averaged from -inf to x.
virtual double density(double x)=0
Get the value of the probability density at x.
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 moment2(double x1, double x2)
Get the second moment of the distribution averaged from x1 to x2.
Definition Probability.C:20
virtual double cumulative_distribution(double x)=0
Get the value of the distribution function at x.
virtual double cumulative_mean(double x)=0
Get the first moment of the distribution averaged from -inf to x.

Generated using doxygen 1.14.0