Add bootstrap

This commit is contained in:
hal8174 2024-06-27 15:14:26 +02:00
parent 42f8bd8a40
commit 96dd15a80e
3 changed files with 98 additions and 20 deletions

View file

@ -14,7 +14,6 @@ private:
size_t time;
size_t last_large_step;
float small_step_size;
float large_step_probability;
bool large_step;
float normalize(float x) {
@ -30,10 +29,9 @@ public:
MLTRandomSampler() {
}
MLTRandomSampler(float small_step_size, float large_step_probability)
MLTRandomSampler(float small_step_size)
: index(0), data({}), last_changed({}), time(0), last_large_step(0),
small_step_size(small_step_size),
large_step_probability(large_step_probability) {}
small_step_size(small_step_size) {}
void init(int id) override { RandomSampler_init(sampler, id); }
@ -52,10 +50,10 @@ public:
last_large_step = time;
}
void new_ray(bool l) {
void new_ray(bool is_large_step) {
index = 0;
new_data.clear();
large_step = l;
large_step = is_large_step;
}
bool is_large_step() { return large_step; }