Search in sources :

Example 1 with PeakAndDeclineModel

use of dr.evomodel.coalescent.PeakAndDeclineModel in project beast-mcmc by beast-dev.

the class PeakAndDeclineModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
    XMLObject cxo = xo.getChild(PEAK_VALUE);
    Parameter peakValueParam = (Parameter) cxo.getChild(Parameter.class);
    Parameter rParam;
    cxo = xo.getChild(SHAPE);
    rParam = (Parameter) cxo.getChild(Parameter.class);
    cxo = xo.getChild(PEAK_TIME);
    Parameter peakTimeParam = (Parameter) cxo.getChild(Parameter.class);
    return new PeakAndDeclineModel(peakValueParam, rParam, peakTimeParam, units);
}
Also used : Parameter(dr.inference.model.Parameter) PeakAndDeclineModel(dr.evomodel.coalescent.PeakAndDeclineModel) Units(dr.evolution.util.Units) XMLUnits(dr.evoxml.util.XMLUnits)

Aggregations

Units (dr.evolution.util.Units)1 PeakAndDeclineModel (dr.evomodel.coalescent.PeakAndDeclineModel)1 XMLUnits (dr.evoxml.util.XMLUnits)1 Parameter (dr.inference.model.Parameter)1