Skip to content

Commit

Permalink
Fixed logP calcs in approximate steppers.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgvaughan committed Jun 18, 2014
1 parent 0117b26 commit 237949d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/master/steppers/SALStepper.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void leap(Reaction reaction, PopulationState state,

if (calcLogP) {
if (rho>0)
stepLogP += -rho + q*Math.log(rho) - Gamma.logGamma(q+1);
stepLogP += -rho + q*Math.log(rho/thisdt) - Gamma.logGamma(q+1);
}

// Implement reactions:
Expand Down
2 changes: 1 addition & 1 deletion src/master/steppers/TauLeapingStepper.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void leap(Reaction reaction, PopulationState state, Model model, boolean

if (calcLogP) {
if (rho>0)
stepLogP += -rho + q*Math.log(rho) - Gamma.logGamma(q+1);
stepLogP += -rho + q*Math.log(rho/thisdt) - Gamma.logGamma(q+1);
}

// Implement reactions:
Expand Down

0 comments on commit 237949d

Please sign in to comment.