Search in sources :

Example 1 with ThresholdStatistic

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

the class ThresholdStatisticParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    double threshold = xo.getAttribute(THRESHOLD, 0.0);
    String name = THRESHOLD_STATISTIC;
    if (xo.hasAttribute(Statistic.NAME)) {
        name = xo.getAttribute(Statistic.NAME, xo.getId());
    } else if (xo.hasAttribute(XMLParser.ID)) {
        name = xo.getAttribute(XMLParser.ID, xo.getId());
    }
    final Statistic statistic = (Statistic) xo.getChild(Statistic.class);
    final ThresholdStatistic thresholdStatistic = new ThresholdStatistic(name, statistic, threshold);
    return thresholdStatistic;
}
Also used : Statistic(dr.inference.model.Statistic) SumStatistic(dr.inference.model.SumStatistic) ThresholdStatistic(dr.inference.model.ThresholdStatistic) ThresholdStatistic(dr.inference.model.ThresholdStatistic)

Aggregations

Statistic (dr.inference.model.Statistic)1 SumStatistic (dr.inference.model.SumStatistic)1 ThresholdStatistic (dr.inference.model.ThresholdStatistic)1