|
| | Beta (const InputParameters ¶meters) |
| |
| virtual Real | pdf (const Real &x) const override |
| |
| virtual Real | cdf (const Real &x) const override |
| |
| virtual Real | quantile (const Real &p) const override |
| |
| virtual Real | median () const |
| |
| virtual bool | enabled () const |
| |
| std::shared_ptr< MooseObject > | getSharedPtr () |
| |
| std::shared_ptr< const MooseObject > | getSharedPtr () const |
| |
| bool | isKokkosObject () const |
| |
| MooseApp & | getMooseApp () const |
| |
| const std::string & | type () const |
| |
| const std::string & | name () const |
| |
| std::string | typeAndName () const |
| |
| MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
| |
| MooseObjectName | uniqueName () const |
| |
| const InputParameters & | parameters () const |
| |
| const hit::Node * | getHitNode () const |
| |
| bool | hasBase () const |
| |
| const std::string & | getBase () const |
| |
| const T & | getParam (const std::string &name) const |
| |
| std::vector< std::pair< T1, T2 > > | getParam (const std::string ¶m1, const std::string ¶m2) const |
| |
| const T * | queryParam (const std::string &name) const |
| |
| const T & | getRenamedParam (const std::string &old_name, const std::string &new_name) const |
| |
| T | getCheckedPointerParam (const std::string &name, const std::string &error_string="") const |
| |
| bool | isParamValid (const std::string &name) const |
| |
| bool | isParamSetByUser (const std::string &name) const |
| |
| void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
| |
| void | paramError (const std::string ¶m, Args... args) const |
| |
| void | paramWarning (const std::string ¶m, Args... args) const |
| |
| void | paramWarning (const std::string ¶m, Args... args) const |
| |
| void | paramInfo (const std::string ¶m, Args... args) const |
| |
| std::string | messagePrefix (const bool hit_prefix=true) const |
| |
| std::string | errorPrefix (const std::string &) const |
| |
| void | mooseError (Args &&... args) const |
| |
| void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
| |
| void | mooseErrorNonPrefixed (Args &&... args) const |
| |
| void | mooseWarning (Args &&... args) const |
| |
| void | mooseWarning (Args &&... args) const |
| |
| void | mooseWarningNonPrefixed (Args &&... args) const |
| |
| void | mooseWarningNonPrefixed (Args &&... args) const |
| |
| void | mooseDeprecated (Args &&... args) const |
| |
| void | mooseDeprecated (Args &&... args) const |
| |
| void | mooseDeprecatedNoTrace (Args &&... args) const |
| |
| void | mooseInfo (Args &&... args) const |
| |
| void | callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const |
| |
| std::string | getDataFileName (const std::string ¶m) const |
| |
| std::string | getDataFileNameByName (const std::string &relative_path) const |
| |
| std::string | getDataFilePath (const std::string &relative_path) const |
| |
| PerfGraph & | perfGraph () |
| |
| const Parallel::Communicator & | comm () const |
| |
| processor_id_type | n_processors () const |
| |
| processor_id_type | processor_id () const |
| |
|
| static InputParameters | validParams () |
| |
| static Real | pdf (const Real &x, const Real &alpha, const Real &beta) |
| |
| static Real | cdf (const Real &x, const Real &alpha, const Real &beta) |
| |
| static Real | quantile (const Real &p, const Real &alpha, const Real &beta) |
| |
| static Real | betaFunction (const Real &a, const Real &b) |
| | Beta function: B(a,b) = Gamma(a)Gamma(b)/Gamma(a+b)
|
| |
| static Real | incompleteBeta (const Real &a, const Real &b, const Real &x) |
| | Lower incomplete beta function.
|
| |
| static Real | incompleteBetaInv (const Real &a, const Real &b, const Real &p) |
| | Inverse of lower incomplete beta function.
|
| |
| static void | callMooseError (MooseApp *const app, const InputParameters ¶ms, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true) |
| |
A class used to generate a Beta distribution.
Definition at line 17 of file Beta.h.
| Real Beta::incompleteBetaInv |
( |
const Real & |
a, |
|
|
const Real & |
b, |
|
|
const Real & |
p |
|
) |
| |
|
static |
Inverse of lower incomplete beta function.
Non-boost implementation uses Newton-Raphson to find root of incompleteBeta(a, b, x) - p
Definition at line 124 of file Beta.C.
125{
128
129
132 const unsigned int max_iter = 1e3;
136 for (unsigned int i = 0; i < max_iter; ++i)
137 {
139 if (std::abs(
f) <
tol)
141 df = std::pow(
x,
a - 1.0) * std::pow(1.0 -
x, b - 1.0) /
scale;
143
144 if (x < 0 || x > 1.0)
145 break;
146 }
147
148
151 for (unsigned int i = 0; i < max_iter; ++i)
152 {
155 if (std::abs(
f) <
tol)
159 else
161 }
162
163 mooseAssert(false, "Could not find inverse of incomplete gamma function.");
165}
Real f(Real x)
Test function for Brents method.
static Real incompleteBetaInv(const Real &a, const Real &b, const Real &p)
Inverse of lower incomplete beta function.
Referenced by incompleteBetaInv(), quantile(), FDistribution::quantile(), and StudentT::quantile().