A class to wrap around a BCPrior to make it positive definite. More...
#include <BCPositiveDefinitePrior.h>
Public Member Functions | |
Constructors and destructors | |
BCPositiveDefinitePrior (BCPrior *prior) | |
Constructor. | |
BCPositiveDefinitePrior (const BCPositiveDefinitePrior &other) | |
Copy constructor. | |
virtual | ~BCPositiveDefinitePrior () |
Destructor. | |
Access to wrapped prior. | |
BCPrior * | Prior () |
const BCPrior * | Prior () const |
Functions overloaded from BCPrior | |
virtual double | GetLogPrior (double x) |
Get log of prior. More... | |
virtual double | GetPrior (double x, bool normalize=false) |
Get prior. More... | |
virtual BCPrior * | Clone () const |
Clone function. | |
virtual bool | IsValid () const |
virtual void | SetFunctionRange (double xmin, double xmax) |
Set ROOT function range. More... | |
virtual double | GetMode (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Return mode of prior (in range). More... | |
virtual double | GetRawMoment (unsigned n, double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Get raw moment of prior distrubion. More... | |
virtual double | GetIntegral (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Get integral of prior. More... | |
virtual double | GetCentralMoment (unsigned n, double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Get central moment of prior distrubion. More... | |
virtual double | GetStandardizedMoment (unsigned n, double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Get standardised moment of prior distrubion. More... | |
virtual double | GetMean (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Get mean of prior. More... | |
virtual double | GetVariance (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Get variance of prior. More... | |
virtual double | GetStandardDeviation (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Get standard deviation of prior. More... | |
virtual double | GetSkewness (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Get skewness of prior. More... | |
virtual double | GetKurtosis (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Get kurtosis of prior. More... | |
virtual double | GetRandomValue (double xmin, double xmax, TRandom *const R=NULL) |
Public Member Functions inherited from BCPrior | |
BCPrior () | |
Empty constructor. | |
BCPrior (const BCPrior &other) | |
Copy constructor. | |
virtual | ~BCPrior () |
Destructor. | |
virtual double | GetLogNormalizedPrior (double x) |
Get log of normalized prior. More... | |
virtual TF1 & | GetFunction () |
Return back ROOT TF1 evaluating BCPrior::GetPrior. | |
virtual const TF1 & | GetFunction () const |
Return back ROOT TF1 evaluating BCPrior::GetPrior. | |
virtual double | GetPriorForROOT (double *x, double *) |
For accessing prior as ROOT TF1. | |
virtual double | GetNormalizedPriorForROOT (double *x, double *) |
For accessing normalized prior as ROOT TF1. | |
virtual double | GetLogPriorForROOT (double *x, double *) |
For accessing log(prior) as ROOT TF1. | |
virtual double | GetNormalizedLogPriorForROOT (double *x, double *) |
For accessing normalized log(prior) as ROOT TF1. | |
virtual double | CalculateAndStoreIntegral (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity()) |
Calculate and store integral for use in normalized TF1s. | |
virtual void | StoreIntegral (double I) |
Store integral;. | |
virtual void | StoreLogIntegral (double logI) |
Store log(integral);. | |
virtual double | GetStoredIntegral () const |
Get stored integral. More... | |
virtual double | GetStoredLogIntegral () const |
Get stored integral. More... | |
virtual void | FillHistogramByCenterValue (TH1 *h) |
Fill histogram by prior evaluated at bin center. More... | |
virtual void | FillHistogramByIntegral (TH1 *h) |
Fill histogram by integrating prior over bin and dividing by bin width. More... | |
virtual BCH1D | GetBCH1D (TH1 *bins, const std::string &name="prior") |
Get BCH1D object for prior. More... | |
virtual BCH2D | GetBCH2D (BCPrior *ordinate, TH2 *bins, const std::string &name="prior") |
Get BCH2D object for prior. More... | |
Protected Attributes | |
BCPrior * | fPrior |
Prior that is cut to positive values. | |
Protected Attributes inherited from BCPrior | |
double | fLogIntegral |
Log of integral of unnormalized pdf over the range. | |
TF1 | fPriorFunction |
operator and swap | |
BCPositiveDefinitePrior & | operator= (BCPositiveDefinitePrior other) |
assignment operator | |
void | swap (BCPositiveDefinitePrior &A, BCPositiveDefinitePrior &B) |
swap | |
Detailed Description
A class to wrap around a BCPrior to make it positive definite.
- Version
- 1.0
- Date
- 01.2015
Definition at line 33 of file BCPositiveDefinitePrior.h.
Member Function Documentation
|
inlinevirtual |
Get central moment of prior distrubion.
If limits are infinite, use exact value from prior type.
- Parameters
-
n moment number xmin lower limit of range to evaluate over xmax upper limit of range to evaluate over
- Returns
- central of prior distribution
Reimplemented from BCPrior.
Definition at line 139 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Get integral of prior.
- Parameters
-
xmin lower limit of range to evaluate over xmax upper limit of range to evaluate over
- Returns
- integral of prior
Reimplemented from BCPrior.
Definition at line 130 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Get kurtosis of prior.
If limits are infinite, use exact value from prior type
- Parameters
-
xmin lower limit of range to evaluate over xmax upper limit of range to evaluate over
- Returns
- kurtosis of prior distribution
Reimplemented from BCPrior.
Definition at line 188 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Get log of prior.
- Parameters
-
x value to evaluate log of prior at
- Returns
- log of prior
Implements BCPrior.
Definition at line 83 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Get mean of prior.
If limits are infinite, use exact value from prior type
- Parameters
-
xmin lower limit of range to evaluate over xmax upper limit of range to evaluate over
- Returns
- mean of prior distribution
Reimplemented from BCPrior.
Definition at line 156 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Return mode of prior (in range).
- Parameters
-
xmin lower limit of range to evaluate over xmax upper limit of range to evaluate over
- Returns
- mode of prior in range.
Reimplemented from BCPrior.
Definition at line 113 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Get prior.
- Parameters
-
x value to evaluate prior at normalize whether to normalize with stored integral
- Returns
- prior
Reimplemented from BCPrior.
Definition at line 91 of file BCPositiveDefinitePrior.h.
|
virtual |
- Returns
- a random value distributed according to the prior.
- Parameters
-
xmin lower limit of range to generate value in xmax upper limit of range to generate value in R Pointer to the random generator to be used, if needed.
- Returns
- random value.
Reimplemented from BCPrior.
Definition at line 46 of file BCPositiveDefinitePrior.cxx.
|
inlinevirtual |
Get raw moment of prior distrubion.
If limits are infinite, use exact value from prior type.
- Parameters
-
n moment number xmin lower limit of range to evaluate over xmax upper limit of range to evaluate over
- Returns
- raw moment of prior distribution
Reimplemented from BCPrior.
Definition at line 122 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Get skewness of prior.
If limits are infinite, use exact value from prior type
- Parameters
-
xmin lower limit of range to evaluate over xmax upper limit of range to evaluate over
- Returns
- skewness of prior distribution
Reimplemented from BCPrior.
Definition at line 180 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Get standard deviation of prior.
If limits are infinite, use exact value from prior type
- Parameters
-
xmin lower limit of range to evaluate over xmax upper limit of range to evaluate over
- Returns
- standard deviation of prior distribution
Reimplemented from BCPrior.
Definition at line 172 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Get standardised moment of prior distrubion.
If limits are infinite, use exact value from prior type.
- Parameters
-
n moment number xmin lower limit of range to evaluate over xmax upper limit of range to evaluate over
- Returns
- standardised moment of prior distribution
Reimplemented from BCPrior.
Definition at line 148 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Get variance of prior.
If limits are infinite, use exact value from prior type
- Parameters
-
xmin lower limit of range to evaluate over xmax upper limit of range to evaluate over
- Returns
- variance of prior distribution
Reimplemented from BCPrior.
Definition at line 164 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
- Returns
- Whether everything needed for prior is set and prior can be used.
Implements BCPrior.
Definition at line 101 of file BCPositiveDefinitePrior.h.
|
inlinevirtual |
Set ROOT function range.
Reimplemented from BCPrior.
Definition at line 105 of file BCPositiveDefinitePrior.h.
The documentation for this class was generated from the following files:
- /root/bat/BAT/BCPositiveDefinitePrior.h
- /root/bat/src/BCPositiveDefinitePrior.cxx