Search in sources :

Example 1 with ScaledPiecewiseModel

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

the class ScaledPiecewiseModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
    XMLObject cxo = xo.getChild(EPOCH_SIZES);
    Parameter epochSizes = (Parameter) cxo.getChild(Parameter.class);
    cxo = xo.getChild(TREE_MODEL);
    TreeModel treeModel = (TreeModel) cxo.getChild(TreeModel.class);
    boolean isLinear = xo.getBooleanAttribute("linear");
    return new ScaledPiecewiseModel(epochSizes, treeModel, isLinear, units);
}
Also used : TreeModel(dr.evomodel.tree.TreeModel) Parameter(dr.inference.model.Parameter) Units(dr.evolution.util.Units) XMLUnits(dr.evoxml.util.XMLUnits) ScaledPiecewiseModel(dr.evomodel.coalescent.ScaledPiecewiseModel)

Aggregations

Units (dr.evolution.util.Units)1 ScaledPiecewiseModel (dr.evomodel.coalescent.ScaledPiecewiseModel)1 TreeModel (dr.evomodel.tree.TreeModel)1 XMLUnits (dr.evoxml.util.XMLUnits)1 Parameter (dr.inference.model.Parameter)1