use of dr.inference.model.TruncatedDistributionLikelihood in project beast-mcmc by beast-dev.
the class TruncatedDistributionLikelihoodParser method parseXMLObject.
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
DistributionLikelihood likelihood = (DistributionLikelihood) xo.getChild(DistributionLikelihood.class);
Parameter low;
Parameter high;
if (xo.getChild(LOW) != null) {
low = (Parameter) xo.getChild(LOW).getChild(Parameter.class);
} else {
low = new Parameter.Default("low", Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
}
if (xo.getChild(HIGH) != null) {
high = (Parameter) xo.getChild(HIGH).getChild(Parameter.class);
} else {
high = new Parameter.Default("high", Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
}
return new TruncatedDistributionLikelihood(likelihood, low, high);
}
Aggregations