use of dr.inference.model.IndianBuffetProcessPrior in project beast-mcmc by beast-dev.
the class IndianBuffetProcessPriorParser method parseXMLObject.
@Override
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
Parameter alpha = (Parameter) xo.getChild(ALPHA).getChild(0);
AdaptableSizeFastMatrixParameter data = (AdaptableSizeFastMatrixParameter) xo.getChild(DATA).getChild(0);
Parameter beta;
if (xo.hasChildNamed(BETA)) {
beta = (Parameter) xo.getChild(BETA).getChild(0);
} else {
beta = new Parameter.Default(1);
}
return new IndianBuffetProcessPrior(alpha, beta, data);
}
Aggregations