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
6
namespace
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
}
Stats.hpp
ppforest2::stats::Uniform::operator()
std::vector< int > operator()(int count, RNG &rng) const
Generate multiple uniform random integers (with replacement).
ppforest2::stats::Uniform::distinct
std::vector< int > distinct(int count, RNG &rng)
Sample without replacement from [min, max].
ppforest2::stats::Uniform::Uniform
Uniform(int min, int max)
Construct a uniform integer generator over [min, max].
ppforest2::stats::Uniform::operator()
int operator()(RNG &rng) const
Generate a single uniform random integer in [min, max].
ppforest2::stats
Statistical infrastructure for training and evaluation.
Definition
ConfusionMatrix.hpp:11
ppforest2::stats::RNG
pcg32 RNG
Definition
Stats.hpp:19
core
src
stats
Uniform.hpp
Generated by
1.13.2