www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
LogisticDistribution Class Reference

A class used to generate a logistic distribution. More...

#include <LogisticDistribution.h>

Inheritance diagram for LogisticDistribution:
[legend]

Public Member Functions

 LogisticDistribution (const InputParameters &parameters)
 
virtual Real pdf (const Real &x) const override
 
virtual Real cdf (const Real &x) const override
 
virtual Real quantile (const Real &p) const override
 

Static Public Member Functions

static InputParameters validParams ()
 
static Real pdf (const Real &x, const Real &location, const Real &shape)
 
static Real cdf (const Real &x, const Real &location, const Real &shape)
 
static Real quantile (const Real &p, const Real &location, const Real &shape)
 

Protected Attributes

const Real & _location
 The location or mean of the distribution (alpha or mu) More...
 
const Real & _shape
 The shape of the distribution (beta or s) More...
 

Detailed Description

A class used to generate a logistic distribution.

Definition at line 22 of file LogisticDistribution.h.

Constructor & Destructor Documentation

◆ LogisticDistribution()

LogisticDistribution::LogisticDistribution ( const InputParameters &  parameters)

Definition at line 28 of file LogisticDistribution.C.

29  : Distribution(parameters), _location(getParam<Real>("location")), _shape(getParam<Real>("shape"))
30 {
31 }

Member Function Documentation

◆ cdf() [1/2]

Real LogisticDistribution::cdf ( const Real &  x) const
overridevirtual

Definition at line 61 of file LogisticDistribution.C.

62 {
63  TIME_SECTION(_perf_cdf);
64  return cdf(x, _location, _shape);
65 }

◆ cdf() [2/2]

Real LogisticDistribution::cdf ( const Real &  x,
const Real &  location,
const Real &  shape 
)
static

Definition at line 41 of file LogisticDistribution.C.

42 {
43  Real z = std::exp(-(x - location) / shape);
44  return 1.0 / (1.0 + z);
45 }

◆ pdf() [1/2]

Real LogisticDistribution::pdf ( const Real &  x) const
overridevirtual

Definition at line 54 of file LogisticDistribution.C.

55 {
56  TIME_SECTION(_perf_pdf);
57  return pdf(x, _location, _shape);
58 }

◆ pdf() [2/2]

Real LogisticDistribution::pdf ( const Real &  x,
const Real &  location,
const Real &  shape 
)
static

Definition at line 34 of file LogisticDistribution.C.

35 {
36  Real z = std::exp(-(x - location) / shape);
37  return z / (shape * Utility::pow<2>(1.0 + z));
38 }

◆ quantile() [1/2]

Real LogisticDistribution::quantile ( const Real &  p) const
overridevirtual

Definition at line 68 of file LogisticDistribution.C.

69 {
70  TIME_SECTION(_perf_quantile);
71  return quantile(p, _location, _shape);
72 }

◆ quantile() [2/2]

Real LogisticDistribution::quantile ( const Real &  p,
const Real &  location,
const Real &  shape 
)
static

Definition at line 48 of file LogisticDistribution.C.

49 {
50  return location - shape * std::log(1.0 / p - 1.0);
51 }

◆ validParams()

InputParameters LogisticDistribution::validParams ( )
static

Definition at line 19 of file LogisticDistribution.C.

20 {
21  InputParameters params = Distribution::validParams();
22  params.addClassDescription("Logistic distribution.");
23  params.addRequiredParam<Real>("location", "Location or mean of the distribution (alpha or mu)");
24  params.addRequiredParam<Real>("shape", "Shape of the distribution (beta or s)");
25  return params;
26 }

Member Data Documentation

◆ _location

const Real& LogisticDistribution::_location
protected

The location or mean of the distribution (alpha or mu)

Definition at line 39 of file LogisticDistribution.h.

Referenced by cdf(), pdf(), and quantile().

◆ _shape

const Real& LogisticDistribution::_shape
protected

The shape of the distribution (beta or s)

Definition at line 42 of file LogisticDistribution.h.

Referenced by cdf(), pdf(), and quantile().


The documentation for this class was generated from the following files:
LogisticDistribution::_shape
const Real & _shape
The shape of the distribution (beta or s)
Definition: LogisticDistribution.h:42
LogisticDistribution::pdf
virtual Real pdf(const Real &x) const override
Definition: LogisticDistribution.C:54
LogisticDistribution::quantile
virtual Real quantile(const Real &p) const override
Definition: LogisticDistribution.C:68
LogisticDistribution::cdf
virtual Real cdf(const Real &x) const override
Definition: LogisticDistribution.C:61
validParams
InputParameters validParams()
LogisticDistribution::_location
const Real & _location
The location or mean of the distribution (alpha or mu)
Definition: LogisticDistribution.h:39