Search in sources :

Example 1 with CoulombPrior

use of dr.inference.model.CoulombPrior in project beast-mcmc by beast-dev.

the class CoulombPriorParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    XMLObject cxo = xo;
    final double beta = xo.getDoubleAttribute(BETA);
    if (xo.hasChildNamed(DATA)) {
        cxo = xo.getChild(DATA);
    }
    CoulombPrior likelihood = new CoulombPrior(beta);
    for (int i = 0; i < cxo.getChildCount(); i++) {
        if (cxo.getChild(i) instanceof Statistic) {
            likelihood.addData((Statistic) cxo.getChild(i));
        }
    }
    return likelihood;
}
Also used : CoulombPrior(dr.inference.model.CoulombPrior) Statistic(dr.inference.model.Statistic)

Aggregations

CoulombPrior (dr.inference.model.CoulombPrior)1 Statistic (dr.inference.model.Statistic)1