Search in sources :

Example 1 with TwoEpochDemographicModel

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

the class TwoEpochDemographicModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
    XMLObject cxo = xo.getChild(EPOCH_1);
    DemographicModel demo1 = (DemographicModel) cxo.getChild(DemographicModel.class);
    cxo = xo.getChild(EPOCH_2);
    DemographicModel demo2 = (DemographicModel) cxo.getChild(DemographicModel.class);
    cxo = xo.getChild(TRANSITION_TIME);
    Parameter timeParameter = (Parameter) cxo.getChild(Parameter.class);
    return new TwoEpochDemographicModel(demo1, demo2, timeParameter, units);
}
Also used : TwoEpochDemographicModel(dr.evomodel.coalescent.TwoEpochDemographicModel) DemographicModel(dr.evomodel.coalescent.DemographicModel) Parameter(dr.inference.model.Parameter) Units(dr.evolution.util.Units) XMLUnits(dr.evoxml.util.XMLUnits) TwoEpochDemographicModel(dr.evomodel.coalescent.TwoEpochDemographicModel)

Aggregations

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