Add bootstrap
This commit is contained in:
parent
42f8bd8a40
commit
96dd15a80e
3 changed files with 98 additions and 20 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue