Search in sources :

Example 1 with SampleStateAndCategoryModel

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

the class SampleStateAndCategoryModelParser 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(CATEGORY_PARAMETER);
    Parameter catParam = (Parameter) cxo.getChild(Parameter.class);
    Vector subModels = new Vector();
    for (int i = 0; i < xo.getChildCount(); i++) {
        if (xo.getChild(i) instanceof SubstitutionModel) {
            subModels.addElement(xo.getChild(i));
        }
    }
    return new SampleStateAndCategoryModel(muParam, catParam, subModels);
}
Also used : SampleStateAndCategoryModel(dr.oldevomodel.sitemodel.SampleStateAndCategoryModel) Parameter(dr.inference.model.Parameter) Vector(java.util.Vector) SubstitutionModel(dr.oldevomodel.substmodel.SubstitutionModel)

Aggregations

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