#include <BinomialProbHelper.h>
Public Member Functions | |
BinomialProbHelper (double rho, int x, int n) | |
double | lratio () const |
int | n () const |
double | prob () const |
double | rho () const |
int | x () const |
Private Attributes | |
double | lratio_ |
int | n_ |
double | prob_ |
double | rho_ |
double | rho_hat_ |
int | x_ |
Definition at line 10 of file BinomialProbHelper.h.
BinomialProbHelper::BinomialProbHelper | ( | double | rho, |
int | x, | ||
int | n | ||
) | [inline] |
Definition at line 12 of file BinomialProbHelper.h.
References lratio_, funct::pow(), and rho_hat_.
: rho_(rho), x_(x), n_(n), rho_hat_(double(x)/n), prob_(ROOT::Math::binomial_pdf(x, rho, n)) { // Cache the likelihood ratio L(\rho)/L(\hat{\rho}), too. if (x == 0) lratio_ = pow(1 - rho, n); else if (x == n) lratio_ = pow(rho, n); else lratio_ = pow(rho/rho_hat_, x) * pow((1 - rho)/(1 - rho_hat_), n - x); }
double BinomialProbHelper::lratio | ( | ) | const [inline] |
Definition at line 29 of file BinomialProbHelper.h.
{ return lratio_; };
int BinomialProbHelper::n | ( | void | ) | const [inline] |
double BinomialProbHelper::prob | ( | ) | const [inline] |
Definition at line 28 of file BinomialProbHelper.h.
References prob_.
Referenced by SterneSorter::operator()().
{ return prob_; };
double BinomialProbHelper::rho | ( | ) | const [inline] |
int BinomialProbHelper::x | ( | ) | const [inline] |
double BinomialProbHelper::lratio_ [private] |
Definition at line 37 of file BinomialProbHelper.h.
Referenced by BinomialProbHelper().
int BinomialProbHelper::n_ [private] |
Definition at line 34 of file BinomialProbHelper.h.
Referenced by n().
double BinomialProbHelper::prob_ [private] |
Definition at line 36 of file BinomialProbHelper.h.
Referenced by prob().
double BinomialProbHelper::rho_ [private] |
Definition at line 29 of file BinomialProbHelper.h.
Referenced by rho().
double BinomialProbHelper::rho_hat_ [private] |
Definition at line 35 of file BinomialProbHelper.h.
Referenced by BinomialProbHelper().
int BinomialProbHelper::x_ [private] |
Definition at line 33 of file BinomialProbHelper.h.
Referenced by x().