Skip to content

Commit

Permalink
clean up interface a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchard committed Oct 5, 2023
1 parent 31e0ceb commit 48b3571
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dr/evomodel/substmodel/LogAdditiveCtmcRateProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@ public interface LogAdditiveCtmcRateProvider extends Model, Likelihood {
double[] getXBeta();

LogColumn[] getColumns();

default double[] getRates() {
double[] rates = getXBeta();
for (int i = 0; i < rates.length; ++i) {
rates[i] = Math.exp(rates[i]);
}
return rates;
}
}

0 comments on commit 48b3571

Please sign in to comment.