Search in sources :

Example 1 with SimpleMCMCOperator

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

the class TreeMaximizationOperatorParser method parseXMLObject.

@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    double weight = xo.getDoubleAttribute(MCMCOperator.WEIGHT);
    int maxSteps = (int) xo.getAttribute(MAX_STEP, 20);
    MaximizerWrtParameter maximizerWrtParameter = (MaximizerWrtParameter) xo.getChild(MaximizerWrtParameter.class);
    SimpleMCMCOperator treeOperator = (SimpleMCMCOperator) xo.getChild(MCMCOperator.class);
    return new TreeMaximizationOperator(treeOperator, maximizerWrtParameter, maxSteps, weight);
}
Also used : SimpleMCMCOperator(dr.inference.operators.SimpleMCMCOperator) MaximizerWrtParameter(dr.evomodel.treedatalikelihood.discrete.MaximizerWrtParameter) MCMCOperator(dr.inference.operators.MCMCOperator) SimpleMCMCOperator(dr.inference.operators.SimpleMCMCOperator) TreeMaximizationOperator(dr.inference.operators.TreeMaximizationOperator)

Example 2 with SimpleMCMCOperator

use of dr.inference.operators.SimpleMCMCOperator 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)

Example 3 with SimpleMCMCOperator

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

the class ApplyOperatorOnceParser method parseXMLObject.

@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    for (int i = 0; i < xo.getChildCount(); ++i) {
        SimpleMCMCOperator operator = (SimpleMCMCOperator) xo.getChild(i);
        operator.doOperation();
    }
    return null;
}
Also used : SimpleMCMCOperator(dr.inference.operators.SimpleMCMCOperator)

Aggregations

SimpleMCMCOperator (dr.inference.operators.SimpleMCMCOperator)3 MaximizerWrtParameter (dr.evomodel.treedatalikelihood.discrete.MaximizerWrtParameter)1 GibbsOperator (dr.inference.operators.GibbsOperator)1 JointGibbsOperator (dr.inference.operators.JointGibbsOperator)1 MCMCOperator (dr.inference.operators.MCMCOperator)1 TreeMaximizationOperator (dr.inference.operators.TreeMaximizationOperator)1