www.mooseframework.org
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
 
Real pdf (const Real &x, const Real &location, const Real &shape) const
 
Real cdf (const Real &x, const Real &location, const Real &shape) const
 
Real quantile (const Real &p, const Real &location, const Real &shape) const
 

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 23 of file LogisticDistribution.h.

Constructor & Destructor Documentation

◆ LogisticDistribution()

LogisticDistribution::LogisticDistribution ( const InputParameters &  parameters)

Definition at line 27 of file LogisticDistribution.C.

28  : Distribution(parameters), _location(getParam<Real>("location")), _shape(getParam<Real>("shape"))
29 {
30 }
const Real & _location
The location or mean of the distribution (alpha or mu)
const Real & _shape
The shape of the distribution (beta or s)

Member Function Documentation

◆ cdf() [1/2]

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

Definition at line 59 of file LogisticDistribution.C.

60 {
61  return cdf(x, _location, _shape);
62 }
const Real & _location
The location or mean of the distribution (alpha or mu)
virtual Real cdf(const Real &x) const override
const Real & _shape
The shape of the distribution (beta or s)

◆ cdf() [2/2]

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

Definition at line 40 of file LogisticDistribution.C.

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

◆ pdf() [1/2]

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

Definition at line 53 of file LogisticDistribution.C.

54 {
55  return pdf(x, _location, _shape);
56 }
const Real & _location
The location or mean of the distribution (alpha or mu)
virtual Real pdf(const Real &x) const override
const Real & _shape
The shape of the distribution (beta or s)

◆ pdf() [2/2]

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

Definition at line 33 of file LogisticDistribution.C.

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

◆ quantile() [1/2]

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

Definition at line 65 of file LogisticDistribution.C.

66 {
67  return quantile(p, _location, _shape);
68 }
const Real & _location
The location or mean of the distribution (alpha or mu)
virtual Real quantile(const Real &p) const override
const Real & _shape
The shape of the distribution (beta or s)

◆ quantile() [2/2]

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

Definition at line 47 of file LogisticDistribution.C.

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

Member Data Documentation

◆ _location

const Real& LogisticDistribution::_location
protected

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

Definition at line 38 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 41 of file LogisticDistribution.h.

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


The documentation for this class was generated from the following files: