use of dr.inference.distribution.MixedDistributionLikelihood in project beast-mcmc by beast-dev.
the class MixedDistributionLikelihoodParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
XMLObject cxo0 = xo.getChild(DISTRIBUTION0);
ParametricDistributionModel model0 = (ParametricDistributionModel) cxo0.getChild(ParametricDistributionModel.class);
XMLObject cxo1 = xo.getChild(DISTRIBUTION1);
ParametricDistributionModel model1 = (ParametricDistributionModel) cxo1.getChild(ParametricDistributionModel.class);
Statistic data = (Statistic) ((XMLObject) xo.getChild(DATA)).getChild(Statistic.class);
Statistic indicators = (Statistic) ((XMLObject) xo.getChild(INDICATORS)).getChild(Statistic.class);
ParametricDistributionModel[] models = { model0, model1 };
try {
return new MixedDistributionLikelihood(models, data, indicators);
} catch (Exception e) {
throw new XMLParseException(e.getMessage());
}
}
Aggregations