multovl  1.3
Multiple overlaps of genomic regions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Public Member Functions | List of all members
multovl::prob::EmpirDistr Class Reference

#include "empirdistr.hh"

Classes

class  Exception
 

Public Member Functions

 EmpirDistr (unsigned int ncell=0)
 
EmpirDistradd (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)
 

Detailed Description

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.

Constructor & Destructor Documentation

multovl::prob::EmpirDistr::EmpirDistr ( unsigned int  ncell = 0)
explicit

Constructs an object so that it is ready to do a CDF approximation with a number of cells

Parameters
ncellthe number of cells, default 100. If ncell=0, then 100 is used.

Member Function Documentation

EmpirDistr& multovl::prob::EmpirDistr::add ( double  x)

adds a value

Parameters
xa sample from the distribution to be approximated.
double multovl::prob::EmpirDistr::cdf ( double  x) const
throw (Exception
)

Interpolates the CDF.

Parameters
xthe value at which the CDF is to be approximated.
Returns
an interpolated value for the CDF, or 0.0 if /x/ lies outside [low()..high()].
Exceptions
Exceptionif evaluate() was not invoked beforehand or if there were no data.
double multovl::prob::EmpirDistr::high ( ) const
throw (Exception
)
Returns
the highest value covered by the approximation.
Exceptions
Exceptionif evaluate() was not invoked beforehand or if there were no data
double multovl::prob::EmpirDistr::low ( ) const
throw (Exception
)
Returns
the lowest value covered by the approximation.
Exceptions
Exceptionif evaluate() was not invoked beforehand or if there were no data
double multovl::prob::EmpirDistr::mean ( ) const
throw (Exception
)
Returns
the (estimated) mean of the distribution.
Exceptions
Exceptionif evaluate() was not invoked beforehand or if there were no data.
double multovl::prob::EmpirDistr::std_dev ( ) const
throw (Exception
)
Returns
the standard deviation (by taking the square root of variance()).
Exceptions
Exceptionif variance() throws.
double multovl::prob::EmpirDistr::variance ( ) const
throw (Exception
)
Returns
the (estimated) variance of the distribution.
Exceptions
Exceptionif evaluate() was not invoked beforehand. or if less than 2 data points have been added to the calling object.

The documentation for this class was generated from the following file: