|
OPTK
0.1.2
Toolkit for global optimisation algorithms
|
#include <types.hpp>
Public Member Functions | |
| qnormal (std::string n, double mu, double sigma, double q) | |
| 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 () |
Public Attributes | |
| double | m_q |
Public Attributes inherited from sspace::normal | |
| double | m_mu |
| double | m_sigma |
Additional Inherited Members | |
Protected Attributes inherited from sspace::normal | |
| std::random_device | rd |
| std::mt19937 | generator |
| std::normal_distribution< double > | dist |
qnormal is for discrete-valued variables which probably take a value of mu.
These variables are still fundamentally unbounded.
| sspace::qnormal::qnormal | ( | std::string | n, |
| double | mu, | ||
| double | sigma, | ||
| double | q | ||
| ) |
the constructor
| n | The name of this parameter |
| mu | The mean of the normal distribution |
| sigma | The standard deviation of the normal distribution |
| q | The quantisation for the sampled values |
|
virtual |
Sample a value from the quantised normal distribution according to the following:
\[ v = \text{round}\big(\text{normal}(\mu, \sigma) / q\big) \cdot q. \]
Reimplemented from sspace::normal.
1.8.13