Search in sources :

Example 1 with DifferenceStatistic

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;
}
Also used : DifferenceStatistic(dr.inference.model.DifferenceStatistic) Statistic(dr.inference.model.Statistic) DifferenceStatistic(dr.inference.model.DifferenceStatistic)

Aggregations

DifferenceStatistic (dr.inference.model.DifferenceStatistic)1 Statistic (dr.inference.model.Statistic)1