Skip to content

Commit 8b5015f

Browse files
committed
more robust state reconstruction in MCMC. fixes #1201
1 parent 47614cb commit 8b5015f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/beast/base/inference/MCMC.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public void initAndValidate() {
200200

201201
// State initialisation
202202
final HashSet<StateNode> operatorStateNodes = new HashSet<>();
203-
for (final Operator op : operatorsInput.get()) {
203+
for (final Operator op : operatorSchedule.operators) {
204204
for (final StateNode stateNode : op.listStateNodes()) {
205205
operatorStateNodes.add(stateNode);
206206
}
@@ -443,6 +443,7 @@ protected void doLoop() throws IOException {
443443
for (long sampleNr = -burnIn; sampleNr <= chainLength; sampleNr++) {
444444
final Operator operator = propagateState(sampleNr);
445445

446+
446447
if (debugFlag && sampleNr % 1 == 0 || sampleNr % 10000 == 0) {
447448
// check that the posterior is correctly calculated at every third
448449
// sample, as long as we are in debug mode

0 commit comments

Comments
 (0)