diff --git a/src/beast/base/inference/distribution/InverseGamma.java b/src/beast/base/inference/distribution/InverseGamma.java index 4482f68b..6181002d 100644 --- a/src/beast/base/inference/distribution/InverseGamma.java +++ b/src/beast/base/inference/distribution/InverseGamma.java @@ -1,14 +1,12 @@ package beast.base.inference.distribution; -import org.apache.commons.math.MathException; -import org.apache.commons.math.distribution.ContinuousDistribution; -import org.apache.commons.math.distribution.Distribution; - import beast.base.core.Description; import beast.base.core.Function; import beast.base.core.Input; -import beast.base.inference.parameter.RealParameter; +import org.apache.commons.math.MathException; +import org.apache.commons.math.distribution.ContinuousDistribution; +import org.apache.commons.math.distribution.Distribution; @@ -19,7 +17,7 @@ public class InverseGamma extends ParametricDistribution { final public Input alphaInput = new Input<>("alpha", "shape parameter, defaults to 2"); final public Input betaInput = new Input<>("beta", "scale parameter, defaults to 2"); - InverseGammaImpl dist = new InverseGammaImpl(2, 2); + protected InverseGammaImpl dist = new InverseGammaImpl(2, 2); @Override public void initAndValidate() { @@ -51,7 +49,7 @@ public Distribution getDistribution() { return dist; } - class InverseGammaImpl implements ContinuousDistribution { + public class InverseGammaImpl implements ContinuousDistribution { double m_fAlpha; double m_fBeta; // log of the constant beta^alpha/Gamma(alpha) @@ -61,7 +59,7 @@ class InverseGammaImpl implements ContinuousDistribution { setAlphaBeta(alpha, beta); } - void setAlphaBeta(double alpha, double beta) { + public void setAlphaBeta(double alpha, double beta) { m_fAlpha = alpha; m_fBeta = beta; C = m_fAlpha * Math.log(m_fBeta) - org.apache.commons.math.special.Gamma.logGamma(m_fAlpha);