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

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

#include <BoostWeibullDistribution.h>

Inheritance diagram for BoostWeibullDistribution:
[legend]

Public Member Functions

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

Protected Attributes

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

Detailed Description

A class used to generate Weibull distribution via Boost.

Definition at line 23 of file BoostWeibullDistribution.h.

Constructor & Destructor Documentation

◆ BoostWeibullDistribution()

BoostWeibullDistribution::BoostWeibullDistribution ( const InputParameters &  parameters)

Definition at line 25 of file BoostWeibullDistribution.C.

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

Member Function Documentation

◆ cdf()

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

Definition at line 92 of file BoostDistribution.h.

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

◆ median()

Real BoostDistribution< boost::math::weibull_distribution< Real > >::median ( ) const
overridevirtualinherited

Definition at line 116 of file BoostDistribution.h.

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

◆ pdf()

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

Definition at line 80 of file BoostDistribution.h.

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

◆ quantile()

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

Definition at line 104 of file BoostDistribution.h.

105 {
106 #ifdef LIBMESH_HAVE_EXTERNAL_BOOST
107  mooseAssert(_distribution_unique_ptr, "Boost distribution pointer not defined.");
109 #else
110  return y; // unreachable
111 #endif
112 }
virtual Real quantile(const Real &y) const override
std::unique_ptr< boost::math::weibull_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::weibull_distribution< Real > > BoostDistribution< boost::math::weibull_distribution< Real > >::_distribution_unique_ptr
protectedinherited

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

Definition at line 61 of file BoostDistribution.h.

Referenced by BoostWeibullDistribution().


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