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

A class used to generate Lognormal distribution via Boost. More...

#include <LognormalDistribution.h>

Inheritance diagram for LognormalDistribution:
[legend]

Public Member Functions

 LognormalDistribution (const InputParameters &parameters)
 
virtual Real pdf (const Real &x) override
 
virtual Real cdf (const Real &x) override
 
virtual Real quantile (const Real &y) override
 
virtual Real median () override
 

Protected Attributes

std::unique_ptr< boost::math::lognormal_distribution< Real > > _distribution_unique_ptr
 This must be defined by the child class in the constructor. More...
 

Detailed Description

A class used to generate Lognormal distribution via Boost.

Definition at line 23 of file LognormalDistribution.h.

Constructor & Destructor Documentation

◆ LognormalDistribution()

LognormalDistribution::LognormalDistribution ( const InputParameters &  parameters)

Definition at line 25 of file LognormalDistribution.C.

27 {
28  _distribution_unique_ptr = libmesh_make_unique<boost::math::lognormal_distribution<Real>>(
29  getParam<Real>("location"), getParam<Real>("scale"));
30 }
A class used to as a base for distributions defined by Boost.
std::unique_ptr< boost::math::lognormal_distribution< Real > > _distribution_unique_ptr
This must be defined by the child class in the constructor.

Member Function Documentation

◆ cdf()

Real BoostDistribution< boost::math::lognormal_distribution< Real > >::cdf ( const Real &  x)
overridevirtualinherited

Definition at line 91 of file BoostDistribution.h.

92 {
93 #ifdef LIBMESH_HAVE_EXTERNAL_BOOST
94  mooseAssert(_distribution_unique_ptr, "Boost distribution pointer not defined.");
96 #else
97  return x; // unreachable
98 #endif
99 }
virtual Real cdf(const Real &x) override
std::unique_ptr< boost::math::lognormal_distribution< Real > > _distribution_unique_ptr
This must be defined by the child class in the constructor.

◆ median()

Real BoostDistribution< boost::math::lognormal_distribution< Real > >::median ( )
overridevirtualinherited

Definition at line 115 of file BoostDistribution.h.

116 {
117 #ifdef LIBMESH_HAVE_EXTERNAL_BOOST
118  mooseAssert(_distribution_unique_ptr, "Boost distribution pointer not defined.");
120 #else
121  return 0; // unreachable
122 #endif
123 }
virtual Real median() override
std::unique_ptr< boost::math::lognormal_distribution< Real > > _distribution_unique_ptr
This must be defined by the child class in the constructor.

◆ pdf()

Real BoostDistribution< boost::math::lognormal_distribution< Real > >::pdf ( const Real &  x)
overridevirtualinherited

Definition at line 79 of file BoostDistribution.h.

80 {
81 #ifdef LIBMESH_HAVE_EXTERNAL_BOOST
82  mooseAssert(_distribution_unique_ptr, "Boost distribution pointer not defined.");
84 #else
85  return x; // unreachable
86 #endif
87 }
std::unique_ptr< boost::math::lognormal_distribution< Real > > _distribution_unique_ptr
This must be defined by the child class in the constructor.
virtual Real pdf(const Real &x) override

◆ quantile()

Real BoostDistribution< boost::math::lognormal_distribution< Real > >::quantile ( const Real &  y)
overridevirtualinherited

Definition at line 103 of file BoostDistribution.h.

104 {
105 #ifdef LIBMESH_HAVE_EXTERNAL_BOOST
106  mooseAssert(_distribution_unique_ptr, "Boost distribution pointer not defined.");
108 #else
109  return y; // unreachable
110 #endif
111 }
virtual Real quantile(const Real &y) override
std::unique_ptr< boost::math::lognormal_distribution< Real > > _distribution_unique_ptr
This must be defined by the child class in the constructor.

Member Data Documentation

◆ _distribution_unique_ptr

std::unique_ptr<boost::math::lognormal_distribution< Real > > BoostDistribution< boost::math::lognormal_distribution< Real > >::_distribution_unique_ptr
protectedinherited

This must be defined by the child class in the constructor.

Definition at line 60 of file BoostDistribution.h.

Referenced by LognormalDistribution().


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