Search in sources :

Example 1 with TaxonRichnessBirthDeathModel

use of dr.evomodel.speciation.TaxonRichnessBirthDeathModel in project beast-mcmc by beast-dev.

the class TaxonRichnessBirthDeathModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
    XMLObject cxo = xo.getChild(BIRTH_RATE);
    Parameter brParameter = (Parameter) cxo.getChild(Parameter.class);
    cxo = xo.getChild(BIRTH_RATE_INDICATORS);
    Parameter indicatorsParameter = (Parameter) cxo.getChild(Parameter.class);
    Parameter meanRate = (Parameter) xo.getElementFirstChild(MEAN_RATE);
    boolean ratesAsMultipliers = xo.getBooleanAttribute(RATES_AS_MULTIPLIERS);
    int dp = xo.getAttribute("dp", 4);
    return new TaxonRichnessBirthDeathModel(brParameter, indicatorsParameter, meanRate, ratesAsMultipliers, units, dp);
}
Also used : TaxonRichnessBirthDeathModel(dr.evomodel.speciation.TaxonRichnessBirthDeathModel) Parameter(dr.inference.model.Parameter) Units(dr.evolution.util.Units) XMLUnits(dr.evoxml.util.XMLUnits)

Aggregations

Units (dr.evolution.util.Units)1 TaxonRichnessBirthDeathModel (dr.evomodel.speciation.TaxonRichnessBirthDeathModel)1 XMLUnits (dr.evoxml.util.XMLUnits)1 Parameter (dr.inference.model.Parameter)1