Search in sources :

Example 1 with MultivariateNormalGibbsOperator

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

the class MultivariateNormalGibbsOperatorParser method parseXMLObject.

@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    MultivariateDistributionLikelihood prior = (MultivariateDistributionLikelihood) xo.getChild(PRIOR).getChild(MultivariateDistributionLikelihood.class);
    MultivariateDistributionLikelihood likelihood = (MultivariateDistributionLikelihood) xo.getChild(LIKELIHOOD).getChild(MultivariateDistributionLikelihood.class);
    //       CompoundParameter data = (CompoundParameter) xo.getChild(CompoundParameter.class);
    String weightTemp = (String) xo.getAttribute(WEIGHT);
    Double weight = Double.parseDouble(weightTemp);
    try {
        //To change body of implemented methods use File | Settings | File Templates.
        return new MultivariateNormalGibbsOperator(likelihood, prior, weight);
    } catch (IllegalDimension illegalDimension) {
        //To change body of catch statement use File | Settings | File Templates.
        illegalDimension.printStackTrace();
    }
    return null;
}
Also used : MultivariateDistributionLikelihood(dr.inference.distribution.MultivariateDistributionLikelihood) MultivariateNormalGibbsOperator(dr.inference.operators.MultivariateNormalGibbsOperator) IllegalDimension(dr.math.matrixAlgebra.IllegalDimension)

Aggregations

MultivariateDistributionLikelihood (dr.inference.distribution.MultivariateDistributionLikelihood)1 MultivariateNormalGibbsOperator (dr.inference.operators.MultivariateNormalGibbsOperator)1 IllegalDimension (dr.math.matrixAlgebra.IllegalDimension)1