Search in sources :

Example 1 with ImportanceNarrowExchange

use of dr.evomodel.operators.ImportanceNarrowExchange in project beast-mcmc by beast-dev.

the class ImportanceNarrowExchangeParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    final TreeModel treeModel = (TreeModel) xo.getChild(TreeModel.class);
    final PatternList patterns = (PatternList) xo.getChild(PatternList.class);
    final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
    final double epsilon = xo.getAttribute(EPSILON, 0.1);
    try {
        return new ImportanceNarrowExchange(treeModel, patterns, epsilon, weight);
    } catch (Exception e) {
        throw new XMLParseException(e.getMessage());
    }
}
Also used : TreeModel(dr.evomodel.tree.TreeModel) PatternList(dr.evolution.alignment.PatternList) ImportanceNarrowExchange(dr.evomodel.operators.ImportanceNarrowExchange)

Aggregations

PatternList (dr.evolution.alignment.PatternList)1 ImportanceNarrowExchange (dr.evomodel.operators.ImportanceNarrowExchange)1 TreeModel (dr.evomodel.tree.TreeModel)1