https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Logistic Class Reference

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

#include <Logistic.h>

Inheritance diagram for Logistic:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 Logistic (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
 
virtual Real median () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
PerfGraphperfGraph ()
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

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)
 

Public Attributes

const ConsoleStream _console
 

Protected Member Functions

PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) 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...
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
const Parallel::Communicator & _communicator
 

Detailed Description

A class used to generate a logistic distribution.

Definition at line 17 of file Logistic.h.

Constructor & Destructor Documentation

◆ Logistic()

Logistic::Logistic ( const InputParameters parameters)

Definition at line 26 of file Logistic.C.

27  : Distribution(parameters), _location(getParam<Real>("location")), _shape(getParam<Real>("shape"))
28 {
29 }
const Real & _shape
The shape of the distribution (beta or s)
Definition: Logistic.h:37
Distribution(const InputParameters &parameters)
const Real & _location
The location or mean of the distribution (alpha or mu)
Definition: Logistic.h:34
const InputParameters & parameters() const

Member Function Documentation

◆ cdf() [1/2]

Real Logistic::cdf ( const Real x) const
overridevirtual

Implements Distribution.

Definition at line 58 of file Logistic.C.

59 {
60  return cdf(x, _location, _shape);
61 }
const Real & _shape
The shape of the distribution (beta or s)
Definition: Logistic.h:37
const std::vector< double > x
const Real & _location
The location or mean of the distribution (alpha or mu)
Definition: Logistic.h:34
virtual Real cdf(const Real &x) const override
Definition: Logistic.C:58

◆ cdf() [2/2]

Real Logistic::cdf ( const Real x,
const Real location,
const Real shape 
)
static

Definition at line 39 of file Logistic.C.

40 {
41  Real z = std::exp(-(x - location) / shape);
42  return 1.0 / (1.0 + z);
43 }
const std::vector< double > x
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ pdf() [1/2]

Real Logistic::pdf ( const Real x) const
overridevirtual

Implements Distribution.

Definition at line 52 of file Logistic.C.

53 {
54  return pdf(x, _location, _shape);
55 }
const Real & _shape
The shape of the distribution (beta or s)
Definition: Logistic.h:37
const std::vector< double > x
const Real & _location
The location or mean of the distribution (alpha or mu)
Definition: Logistic.h:34
virtual Real pdf(const Real &x) const override
Definition: Logistic.C:52

◆ pdf() [2/2]

Real Logistic::pdf ( const Real x,
const Real location,
const Real shape 
)
static

Definition at line 32 of file Logistic.C.

33 {
34  Real z = std::exp(-(x - location) / shape);
35  return z / (shape * Utility::pow<2>(1.0 + z));
36 }
const std::vector< double > x
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ quantile() [1/2]

Real Logistic::quantile ( const Real p) const
overridevirtual

Implements Distribution.

Definition at line 64 of file Logistic.C.

65 {
66  return quantile(p, _location, _shape);
67 }
const Real & _shape
The shape of the distribution (beta or s)
Definition: Logistic.h:37
virtual Real quantile(const Real &p) const override
Definition: Logistic.C:64
const Real & _location
The location or mean of the distribution (alpha or mu)
Definition: Logistic.h:34

◆ quantile() [2/2]

Real Logistic::quantile ( const Real p,
const Real location,
const Real shape 
)
static

Definition at line 46 of file Logistic.C.

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

◆ validParams()

InputParameters Logistic::validParams ( )
static

Definition at line 17 of file Logistic.C.

Referenced by LogisticDistribution::validParams().

18 {
20  params.addClassDescription("Logistic distribution.");
21  params.addRequiredParam<Real>("location", "Location or mean of the distribution (alpha or mu)");
22  params.addRequiredParam<Real>("shape", "Shape of the distribution (beta or s)");
23  return params;
24 }
void addRequiredParam(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _location

const Real& Logistic::_location
protected

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

Definition at line 34 of file Logistic.h.

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

◆ _shape

const Real& Logistic::_shape
protected

The shape of the distribution (beta or s)

Definition at line 37 of file Logistic.h.

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


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