use of dr.evomodel.coalescent.ConstantPopulationSizeModel in project beast-mcmc by beast-dev.
the class ConstantPopulationModelParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
XMLObject cxo = xo.getChild(POPULATION_SIZE);
boolean logSpace = cxo.getAttribute(LOG_SPACE, false);
Parameter N0Param = (Parameter) cxo.getChild(Parameter.class);
if (logSpace) {
// ConstantPopulationSizeModel provides a model with N0 in log space
return new ConstantPopulationSizeModel(N0Param, units);
} else {
return new ConstantPopulationModel(N0Param, units);
}
}
use of dr.evomodel.coalescent.ConstantPopulationSizeModel in project beast-mcmc by beast-dev.
the class ConstantPopulationSizeModelParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
Parameter N0Param = null;
if (xo.hasChildNamed(LOG_POPULATION_SIZE)) {
N0Param = (Parameter) xo.getElementFirstChild(LOG_POPULATION_SIZE);
}
return new ConstantPopulationSizeModel(N0Param, units);
}
Aggregations