From e436a421d561684d02d28a8da999c126783c15d3 Mon Sep 17 00:00:00 2001 From: twoseventwo Date: Mon, 17 Jul 2023 12:45:13 +0100 Subject: [PATCH] A few trivial changes --- src/dr/evomodel/siteratemodel/GammaSiteRateDelegate.java | 2 -- src/dr/evomodelxml/siteratemodel/GammaSiteRateModelParser.java | 1 + src/dr/math/GeneralisedGaussLaguerreQuadrature.java | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dr/evomodel/siteratemodel/GammaSiteRateDelegate.java b/src/dr/evomodel/siteratemodel/GammaSiteRateDelegate.java index 68586e4c47..4eea862668 100644 --- a/src/dr/evomodel/siteratemodel/GammaSiteRateDelegate.java +++ b/src/dr/evomodel/siteratemodel/GammaSiteRateDelegate.java @@ -236,8 +236,6 @@ public static void setQuadratureRates(double[] categoryRates, double[] categoryP categoryProportions[i + offset] = coefficients[i]/GammaFunction.gamma(alpha); } - double nothing; - } /** diff --git a/src/dr/evomodelxml/siteratemodel/GammaSiteRateModelParser.java b/src/dr/evomodelxml/siteratemodel/GammaSiteRateModelParser.java index 9f86bc4f2b..19de14142d 100644 --- a/src/dr/evomodelxml/siteratemodel/GammaSiteRateModelParser.java +++ b/src/dr/evomodelxml/siteratemodel/GammaSiteRateModelParser.java @@ -131,6 +131,7 @@ public Object parseXMLObject(XMLObject xo) throws XMLParseException { DiscretizedSiteRateModel siteRateModel = new DiscretizedSiteRateModel(SiteModel.SITE_MODEL, muParam, muWeight, delegate); siteRateModel.setSubstitutionModel(substitutionModel); + siteRateModel.addModel(substitutionModel); return siteRateModel; } diff --git a/src/dr/math/GeneralisedGaussLaguerreQuadrature.java b/src/dr/math/GeneralisedGaussLaguerreQuadrature.java index 69e73be490..e975a27e39 100644 --- a/src/dr/math/GeneralisedGaussLaguerreQuadrature.java +++ b/src/dr/math/GeneralisedGaussLaguerreQuadrature.java @@ -109,7 +109,7 @@ private void setupArrays(){ throw new RuntimeException("Too many iterations"); } abscissae[i] = z; - coefficients[i] = -Math.exp(GammaFunction.lnGamma(alpha+noPoints) - GammaFunction.lnGamma((double)noPoints))/ + coefficients[i] = -Math.exp(GammaFunction.lnGamma(alpha+noPoints) - GammaFunction.lnGamma(noPoints))/ (pp*noPoints*p2); }