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;
}
Aggregations