ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
Normal.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4#include <vector>
5
6#include "stats/Stats.hpp"
7
8namespace ppforest2::stats {
22 class Normal {
23 private:
24 float mean;
25 float std_dev;
26
27 std::optional<float> cached_z;
28
39 double gen_unif01(RNG& rng);
40
47 float denormalize(float z);
48
49 public:
56 Normal(float mean, float std_dev);
57
74 float operator()(RNG& rng);
75
83 std::vector<float> operator()(int count, RNG& rng);
84 };
85}
std::vector< float > operator()(int count, RNG &rng)
Generate multiple normal variates.
Normal(float mean, float std_dev)
Construct a Normal generator.
float operator()(RNG &rng)
Generate a single normal variate via the Box-Muller transform.
Statistical infrastructure for training and evaluation.
Definition ConfusionMatrix.hpp:11
pcg32 RNG
Definition Stats.hpp:19