From 48b35710c8640773d9944136e808ca0fd605aa4d Mon Sep 17 00:00:00 2001 From: "Marc A. Suchard" Date: Wed, 4 Oct 2023 17:58:02 -0700 Subject: [PATCH] clean up interface a bit --- .../evomodel/substmodel/LogAdditiveCtmcRateProvider.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dr/evomodel/substmodel/LogAdditiveCtmcRateProvider.java b/src/dr/evomodel/substmodel/LogAdditiveCtmcRateProvider.java index 194f2a71f4..652ec7d3f4 100644 --- a/src/dr/evomodel/substmodel/LogAdditiveCtmcRateProvider.java +++ b/src/dr/evomodel/substmodel/LogAdditiveCtmcRateProvider.java @@ -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; + } }