OPTK  0.1.2
Toolkit for global optimisation algorithms
Public Member Functions | List of all members
sspace::lognormal Class Reference

#include <types.hpp>

Inheritance diagram for sspace::lognormal:
sspace::normal sspace::param_t sspace::qlognormal

Public Member Functions

 lognormal (std::string n, double mu, double sigma)
 
 lognormal (std::string n, double mu, double sigma, pt t)
 
double sample ()
 
- Public Member Functions inherited from sspace::normal
 normal (std::string n, double mu, double sigma)
 
 normal (std::string n, double mu, double sigma, pt t)
 
- Public Member Functions inherited from sspace::param_t
 param_t (std::string n, pt t)
 
virtual ~param_t ()
 
virtual pt get_type ()
 
virtual std::string get_name ()
 

Additional Inherited Members

- Public Attributes inherited from sspace::normal
double m_mu
 
double m_sigma
 
- Protected Attributes inherited from sspace::normal
std::random_device rd
 
std::mt19937 generator
 
std::normal_distribution< double > dist
 

Detailed Description

A lognormal parameter follows a log-normal distribution. Implicitly it is constrained to take only positive real values.

Constructor & Destructor Documentation

◆ lognormal() [1/2]

sspace::lognormal::lognormal ( std::string  n,
double  mu,
double  sigma 
)

The constructor

Parameters
nThe name of this parameter
nThe mean of the normal distribution.
nThe standard deviation of the normal distribution.

◆ lognormal() [2/2]

sspace::lognormal::lognormal ( std::string  n,
double  mu,
double  sigma,
pt  t 
)

The polymorphic constructor. Do not call.

Member Function Documentation

◆ sample()

double sspace::lognormal::sample ( )
virtual

Draw values from the exponentiated normal distribution;

\[ p(x \vert \mu, \sigma ) = \exp \bigg(\mathcal{N}(x; \mu, \sigma)\bigg). \]

Reimplemented from sspace::normal.

Reimplemented in sspace::qlognormal.


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