use of dr.inference.operators.MultivariateNormalGibbsOperator in project beast-mcmc by beast-dev.
the class MultivariateNormalGibbsOperatorParser method parseXMLObject.
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
MultivariateDistributionLikelihood prior = (MultivariateDistributionLikelihood) xo.getChild(PRIOR).getChild(MultivariateDistributionLikelihood.class);
MultivariateDistributionLikelihood likelihood = (MultivariateDistributionLikelihood) xo.getChild(LIKELIHOOD).getChild(MultivariateDistributionLikelihood.class);
// CompoundParameter data = (CompoundParameter) xo.getChild(CompoundParameter.class);
String weightTemp = (String) xo.getAttribute(WEIGHT);
Double weight = Double.parseDouble(weightTemp);
try {
//To change body of implemented methods use File | Settings | File Templates.
return new MultivariateNormalGibbsOperator(likelihood, prior, weight);
} catch (IllegalDimension illegalDimension) {
//To change body of catch statement use File | Settings | File Templates.
illegalDimension.printStackTrace();
}
return null;
}
Aggregations