Search in sources :

Example 1 with SetOperator

use of dr.inference.operators.SetOperator in project beast-mcmc by beast-dev.

the class SetOperatorParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    double[] values = xo.getDoubleArrayAttribute(SET);
    double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
    Parameter parameter = (Parameter) xo.getChild(Parameter.class);
    System.out.println("Creating set operator for parameter " + parameter.getParameterName());
    System.out.print("  set = {" + values[0]);
    for (int i = 1; i < values.length; i++) {
        System.out.print(", " + values[i]);
    }
    System.out.println("}");
    SetOperator operator = new SetOperator(parameter, values);
    operator.setWeight(weight);
    return operator;
}
Also used : SetOperator(dr.inference.operators.SetOperator) Parameter(dr.inference.model.Parameter)

Aggregations

Parameter (dr.inference.model.Parameter)1 SetOperator (dr.inference.operators.SetOperator)1