Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,14 @@ namespace SampleFlow
b_dist(0, n_chains - 3);

typename std::vector<OutputType>::size_type b = b_dist(rng);
if (b >= std::min<typename std::vector<OutputType>::size_type>(a, chain))
++b;
if (b >= std::max(a, chain))
b += 2;
else if (b >= std::min<typename std::vector<OutputType>::size_type>(a, chain))
b += 1;
++b;
const OutputType trial_b = current_samples[b];

assert (a!=b);

// Combine trial a and trial b
const OutputType crossover_result = crossover(current_samples[chain], trial_a, trial_b);
trial_sample_and_ratio = propose_sample(crossover_result);
Expand Down
2 changes: 1 addition & 1 deletion tests/differential_evaluation_mh_producer_01.output
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Mean value = 1.9881
Mean value = 1.98196
Loading