use of dr.inference.operators.SwapOperator in project beast-mcmc by beast-dev.
the class SwapOperatorParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
Parameter parameter = (Parameter) xo.getChild(Parameter.class);
double weight = xo.getDoubleAttribute("weight");
int size = xo.getIntegerAttribute("size");
boolean autoOptimize = xo.getBooleanAttribute("autoOptimize");
if (autoOptimize)
throw new XMLParseException("swapOperator can't be optimized!");
System.out.println("Creating swap operator for parameter " + parameter.getParameterName() + " (weight=" + weight + ")");
SwapOperator so = new SwapOperator(parameter, size);
so.setWeight(weight);
return so;
}
Aggregations