minor code changes

This commit is contained in:
k-a-z-u
2017-12-06 17:09:54 +01:00
parent 63bc2f3046
commit ade2425fbd
2 changed files with 45 additions and 18 deletions

View File

@@ -26,8 +26,13 @@ namespace Distribution {
Normal(const T mu, const T sigma) :
mu(mu), sigma(sigma), _a(1.0 / (sigma * std::sqrt(2.0 * M_PI))), gen(RANDOM_SEED), dist(mu,sigma) {
#warning "analyze issue when coping an existing distribution and using draw() afterwards. this seems to yield issues"
}
/** do not allow copy. this will not work as expected for std::normal_distribution when using draw() ?! */
//Normal(const Normal& o) = delete;
/** get probability for the given value */
T getProbability(const T val) const {
const T b = -0.5 * ((val-mu)/sigma) * ((val-mu)/sigma);