https://mooseframework.inl.gov
Beta.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "Distribution.h"
13 
17 class Beta : public Distribution
18 {
19 public:
21 
23 
24  virtual Real pdf(const Real & x) const override;
25  virtual Real cdf(const Real & x) const override;
26  virtual Real quantile(const Real & p) const override;
27 
28  static Real pdf(const Real & x, const Real & alpha, const Real & beta);
29  static Real cdf(const Real & x, const Real & alpha, const Real & beta);
30  static Real quantile(const Real & p, const Real & alpha, const Real & beta);
31 
33  static Real betaFunction(const Real & a, const Real & b);
39  static Real incompleteBeta(const Real & a, const Real & b, const Real & x);
44  static Real incompleteBetaInv(const Real & a, const Real & b, const Real & p);
45 
46 protected:
48  const Real & _alpha;
50  const Real & _beta;
51 };
static InputParameters validParams()
Definition: Beta.C:17
const Real & _beta
Shape parameter 2.
Definition: Beta.h:50
virtual Real quantile(const Real &p) const override
Definition: Beta.C:70
virtual Real pdf(const Real &x) const override
Definition: Beta.C:58
static Real incompleteBetaInv(const Real &a, const Real &b, const Real &p)
Inverse of lower incomplete beta function.
Definition: Beta.C:124
const std::vector< double > x
Beta(const InputParameters &parameters)
Definition: Beta.C:26
static Real betaFunction(const Real &a, const Real &b)
Beta function: B(a,b) = Gamma(a)Gamma(b)/Gamma(a+b)
Definition: Beta.C:76
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string alpha
Definition: NS.h:134
A class used to generate a Beta distribution.
Definition: Beta.h:17
static Real incompleteBeta(const Real &a, const Real &b, const Real &x)
Lower incomplete beta function.
Definition: Beta.C:82
const InputParameters & parameters() const
const Real & _alpha
Shape parameter 1.
Definition: Beta.h:48
virtual Real cdf(const Real &x) const override
Definition: Beta.C:64