Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Static Public Member Functions | List of all members
CumulativeBinomial Class Reference

Computes the cumulative binomial function. More...

#include <OpenMS/MATH/STATISTICS/CumulativeBinomial.h>

Static Public Member Functions

static double compute (Size n, Size k, double p)
 Compute the cumulative binomial function. More...
 

Detailed Description

Computes the cumulative binomial function.

Member Function Documentation

◆ compute()

static double compute ( Size  n,
Size  k,
double  p 
)
static

Compute the cumulative binomial function.

Sums up ( n choose i ) * p^i * (1-p)^(n-i) for i from 0 to k.

Note
if the binomial coefficient ( n choose k ) overflows, it is set to the numeric limit for the double type
Parameters
n,sizeof theoretical spectrum
k,numberof matched peaks
p,probabilityof a random match between a theoretical and an experimental peak

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:15 using doxygen 1.8.13