https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Gamma.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
17class Gamma : public Distribution
18{
19public:
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
38 static Real incompleteGamma(const Real & a, const Real & x);
43 static Real incompleteGammaInv(const Real & a, const Real & p);
44
45protected:
47 const Real & _alpha;
49 const Real & _theta;
50};
const std::vector< double > x
const Real p
A class used to generate a Gamma distribution.
Definition Gamma.h:18
static Real incompleteGammaInv(const Real &a, const Real &p)
Inverse of lower incomplete gamma function.
Definition Gamma.C:98
virtual Real pdf(const Real &x) const override
Definition Gamma.C:58
static Real incompleteGamma(const Real &a, const Real &x)
Lower incomplete gamma function.
Definition Gamma.C:76
virtual Real quantile(const Real &p) const override
Definition Gamma.C:70
const Real & _alpha
Shape.
Definition Gamma.h:47
static InputParameters validParams()
Definition Gamma.C:17
virtual Real cdf(const Real &x) const override
Definition Gamma.C:64
const Real & _theta
Scaling.
Definition Gamma.h:49
const InputParameters & parameters() const