use of dr.evomodel.coalescent.ExponentialGrowthModel in project beast-mcmc by beast-dev.
the class ExponentialGrowthModelParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
XMLObject cxo = xo.getChild(POPULATION_SIZE);
Parameter N0Param = (Parameter) cxo.getChild(Parameter.class);
Parameter rParam;
boolean usingGrowthRate = true;
if (xo.getChild(GROWTH_RATE) != null) {
cxo = xo.getChild(GROWTH_RATE);
rParam = (Parameter) cxo.getChild(Parameter.class);
} else {
cxo = xo.getChild(DOUBLING_TIME);
rParam = (Parameter) cxo.getChild(Parameter.class);
usingGrowthRate = false;
}
return new ExponentialGrowthModel(N0Param, rParam, units, usingGrowthRate);
}
Aggregations