Search in sources :

Example 1 with TwoEpochDemographicModel

use of dr.evomodel.coalescent.demographicmodel.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 : DemographicModel(dr.evomodel.coalescent.demographicmodel.DemographicModel) TwoEpochDemographicModel(dr.evomodel.coalescent.demographicmodel.TwoEpochDemographicModel) Parameter(dr.inference.model.Parameter) Units(dr.evolution.util.Units) XMLUnits(dr.evoxml.util.XMLUnits) TwoEpochDemographicModel(dr.evomodel.coalescent.demographicmodel.TwoEpochDemographicModel)

Aggregations

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