use of dr.evomodel.coalescent.ScaledPiecewiseModel in project beast-mcmc by beast-dev.
the class ScaledPiecewiseModelParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
XMLObject cxo = xo.getChild(EPOCH_SIZES);
Parameter epochSizes = (Parameter) cxo.getChild(Parameter.class);
cxo = xo.getChild(TREE_MODEL);
TreeModel treeModel = (TreeModel) cxo.getChild(TreeModel.class);
boolean isLinear = xo.getBooleanAttribute("linear");
return new ScaledPiecewiseModel(epochSizes, treeModel, isLinear, units);
}
Aggregations