ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
Uniform.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4#include "stats/Stats.hpp"
5
6namespace ppforest2::stats {
25 class Uniform {
26 private:
27 int min;
28 int max;
29
46 uint32_t gen_lemire(uint32_t s, RNG& rng) const;
47
48 public:
55 Uniform(int min, int max);
56
63 int operator()(RNG& rng) const;
64
72 std::vector<int> operator()(int count, RNG& rng) const;
73
90 std::vector<int> distinct(int count, RNG& rng);
91 };
92}
std::vector< int > operator()(int count, RNG &rng) const
Generate multiple uniform random integers (with replacement).
std::vector< int > distinct(int count, RNG &rng)
Sample without replacement from [min, max].
Uniform(int min, int max)
Construct a uniform integer generator over [min, max].
int operator()(RNG &rng) const
Generate a single uniform random integer in [min, max].
Statistical infrastructure for training and evaluation.
Definition ConfusionMatrix.hpp:11
pcg32 RNG
Definition Stats.hpp:19