Search in sources :

Example 1 with RatioStatistic

use of dr.inference.model.RatioStatistic in project beast-mcmc by beast-dev.

the class RatioStatisticParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    Statistic numerator = (Statistic) xo.getChild(0);
    Statistic denominator = (Statistic) xo.getChild(1);
    RatioStatistic ratioStatistic;
    try {
        ratioStatistic = new RatioStatistic(RATIO_STATISTIC, numerator, denominator);
    } catch (IllegalArgumentException iae) {
        throw new XMLParseException("Error parsing " + getParserName() + " the numerator and denominator statistics " + "should be of the same dimension or of dimension 1");
    }
    return ratioStatistic;
}
Also used : RatioStatistic(dr.inference.model.RatioStatistic) Statistic(dr.inference.model.Statistic) RatioStatistic(dr.inference.model.RatioStatistic)

Aggregations

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