Search in sources :

Example 1 with SampleStateModel

use of dr.oldevomodel.sitemodel.SampleStateModel in project beast-mcmc by beast-dev.

the class SampleStateModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    XMLObject cxo = xo.getChild(MUTATION_RATE);
    Parameter muParam = (Parameter) cxo.getChild(Parameter.class);
    cxo = xo.getChild(PROPORTIONS);
    Parameter proportionParameter = (Parameter) cxo.getChild(Parameter.class);
    Vector<Object> subModels = new Vector<Object>();
    for (int i = 0; i < xo.getChildCount(); i++) {
        if (xo.getChild(i) instanceof SubstitutionModel) {
            subModels.addElement(xo.getChild(i));
        }
    }
    return new SampleStateModel(muParam, proportionParameter, subModels);
}
Also used : Parameter(dr.inference.model.Parameter) Vector(java.util.Vector) SubstitutionModel(dr.oldevomodel.substmodel.SubstitutionModel) SampleStateModel(dr.oldevomodel.sitemodel.SampleStateModel)

Aggregations

Parameter (dr.inference.model.Parameter)1 SampleStateModel (dr.oldevomodel.sitemodel.SampleStateModel)1 SubstitutionModel (dr.oldevomodel.substmodel.SubstitutionModel)1 Vector (java.util.Vector)1