use of dr.inference.model.DifferenceStatistic in project beast-mcmc by beast-dev.
the class DifferenceStatisticParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
boolean absolute = xo.getAttribute(ABSOLUTE, false);
Statistic term1 = (Statistic) xo.getChild(0);
Statistic term2 = (Statistic) xo.getChild(1);
DifferenceStatistic differenceStatistic;
try {
differenceStatistic = new DifferenceStatistic(DIFFERENCE_STATISTIC, term1, term2, absolute);
} catch (IllegalArgumentException iae) {
throw new XMLParseException("Error parsing " + getParserName() + " the left and right statistics " + "should be of the same dimension or of dimension 1");
}
return differenceStatistic;
}
Aggregations