Search in sources :

Example 1 with RandomWalkIntegerSetSizeWeightedOperator

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

the class RandomWalkIntegerSetSizeWeightedOperatorParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
    double d = xo.getDoubleAttribute(WINDOW_SIZE);
    if (d != Math.floor(d)) {
        throw new XMLParseException("The window size of a " + RANDOM_WALK_INT_SET_SIZE_WGT_OP + " should be an integer");
    }
    double baseSetSize = xo.getDoubleAttribute(BASE_SET_SIZE);
    int windowSize = (int) d;
    Parameter parameter = (Parameter) xo.getChild(Parameter.class);
    MicrosatelliteSamplerTreeModel msatSampleTreeModel = (MicrosatelliteSamplerTreeModel) xo.getChild(MicrosatelliteSamplerTreeModel.class);
    return new RandomWalkIntegerSetSizeWeightedOperator(parameter, windowSize, weight, msatSampleTreeModel, baseSetSize);
}
Also used : RandomWalkIntegerSetSizeWeightedOperator(dr.evomodel.operators.RandomWalkIntegerSetSizeWeightedOperator) MicrosatelliteSamplerTreeModel(dr.evomodel.tree.MicrosatelliteSamplerTreeModel) Parameter(dr.inference.model.Parameter)

Aggregations

RandomWalkIntegerSetSizeWeightedOperator (dr.evomodel.operators.RandomWalkIntegerSetSizeWeightedOperator)1 MicrosatelliteSamplerTreeModel (dr.evomodel.tree.MicrosatelliteSamplerTreeModel)1 Parameter (dr.inference.model.Parameter)1