use of dr.evomodel.continuous.RestrictedPartials in project beast-mcmc by beast-dev.
the class RestrictedPartialsParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
String name = xo.getId();
TreeModel tree = (TreeModel) xo.getChild(TreeModel.class);
TaxonList taxa = MonophylyStatisticParser.parseTaxonListOrTaxa(xo.getChild(MonophylyStatisticParser.MRCA));
Parameter meanParameter = (Parameter) xo.getElementFirstChild(MultivariateDistributionLikelihood.MVN_MEAN);
Parameter priorSampleSize = (Parameter) xo.getElementFirstChild(AbstractMultivariateTraitLikelihood.PRIOR_SAMPLE_SIZE);
RestrictedPartials rp = null;
try {
rp = new RestrictedPartials(name, tree, taxa, meanParameter, priorSampleSize);
} catch (TreeUtils.MissingTaxonException e) {
throw new XMLParseException("Unable to find taxa for " + xo.getId());
}
return rp;
}
Aggregations