use of dr.inference.operators.LogRandomWalkOperator in project beast-mcmc by beast-dev.
the class LogRandomWalkOperatorParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
CoercionMode mode = CoercionMode.parseMode(xo);
final double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
final double size = xo.getDoubleAttribute(WINDOW_SIZE);
final boolean scaleAll = xo.getAttribute(SCALE_ALL, false);
final boolean scaleAllInd = xo.getAttribute(SCALE_ALL_IND, false);
if (size <= 0.0) {
throw new XMLParseException("size must be positive");
}
final Parameter parameter = (Parameter) xo.getChild(Parameter.class);
return new LogRandomWalkOperator(parameter, size, mode, weight, scaleAll, scaleAllInd);
}
Aggregations