Skip to content

Commit

Permalink
try to debug BSS epoch simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchard committed Jan 6, 2025
1 parent f3ca44c commit 4587151
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/dr/app/beagle/tools/Partition.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,21 @@ private void traverse(NodeRef node, //
System.out.println("destination length: " + cProb.length);
}

// TODO Add matrix permute here to debug

private static boolean doSomethingStupid = false;

if (doSomethingStupid) {
double[] prob = probabilities[category[i]];
for (int i = 0; i < stateCount; ++i) {
for (int j = i + 1; j < stateCount; ++j) {
double p = prob[i * stateCount + j];
prob[i * stateCount + j] = prob[j * stateCount + i];
prob[j * stateCount + i] = p;
}
}
}

System.arraycopy(probabilities[category[i]], parentSequence[i] * stateCount, cProb, 0, stateCount);

if (DEBUG) {
Expand Down

0 comments on commit 4587151

Please sign in to comment.