Search in sources :

Example 1 with JointGibbsOperator

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

the class JointGibbsOperatorParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    final double weight = xo.getDoubleAttribute(WEIGHT);
    JointGibbsOperator operator = new JointGibbsOperator(weight);
    for (int i = 0; i < xo.getChildCount(); i++) {
        if (xo.getChild(i) instanceof GibbsOperator)
            operator.addOperator((SimpleMCMCOperator) xo.getChild(i));
        else
            throw new RuntimeException("Operator list must consist only of GibbsOperators");
    }
    return operator;
}
Also used : SimpleMCMCOperator(dr.inference.operators.SimpleMCMCOperator) JointGibbsOperator(dr.inference.operators.JointGibbsOperator) GibbsOperator(dr.inference.operators.GibbsOperator) JointGibbsOperator(dr.inference.operators.JointGibbsOperator)

Aggregations

GibbsOperator (dr.inference.operators.GibbsOperator)1 JointGibbsOperator (dr.inference.operators.JointGibbsOperator)1 SimpleMCMCOperator (dr.inference.operators.SimpleMCMCOperator)1