multovl
1.3
Multiple overlaps of genomic regions
|
#include "empirdistr.hh"
Classes | |
class | Exception |
Public Member Functions | |
EmpirDistr (unsigned int ncell=0) | |
EmpirDistr & | add (double x) |
void | evaluate () |
evaluate(): normalise the counts and make the CDF. | |
double | low () const throw (Exception) |
double | high () const throw (Exception) |
double | cdf (double x) const throw (Exception) |
double | mean () const throw (Exception) |
double | variance () const throw (Exception) |
double | std_dev () const throw (Exception) |
Objects of the EmpirDistr class implement univariate continuous empirical distributions that are approximated by histograms. Samples can be added to an EmpirDistr object and after data collection the approximate CDF can be queried.
|
explicit |
Constructs an object so that it is ready to do a CDF approximation with a number of cells
ncell | the number of cells, default 100. If ncell=0, then 100 is used. |
EmpirDistr& multovl::prob::EmpirDistr::add | ( | double | x | ) |
adds a value
x | a sample from the distribution to be approximated. |
double multovl::prob::EmpirDistr::cdf | ( | double | x | ) | const |
throw | ( | Exception | |||
) |
Interpolates the CDF.
x | the value at which the CDF is to be approximated. |
Exception | if evaluate() was not invoked beforehand or if there were no data. |
double multovl::prob::EmpirDistr::high | ( | ) | const | |
throw | ( | Exception | ||
) |
Exception | if evaluate() was not invoked beforehand or if there were no data |
double multovl::prob::EmpirDistr::low | ( | ) | const | |
throw | ( | Exception | ||
) |
Exception | if evaluate() was not invoked beforehand or if there were no data |
double multovl::prob::EmpirDistr::mean | ( | ) | const | |
throw | ( | Exception | ||
) |
Exception | if evaluate() was not invoked beforehand or if there were no data. |
double multovl::prob::EmpirDistr::std_dev | ( | ) | const | |
throw | ( | Exception | ||
) |
Exception | if variance() throws. |
double multovl::prob::EmpirDistr::variance | ( | ) | const | |
throw | ( | Exception | ||
) |
Exception | if evaluate() was not invoked beforehand. or if less than 2 data points have been added to the calling object. |