本文整理匯總了Java中dr.inference.distribution.DistributionLikelihood.setRange方法的典型用法代碼示例。如果您正苦於以下問題:Java DistributionLikelihood.setRange方法的具體用法?Java DistributionLikelihood.setRange怎麽用?Java DistributionLikelihood.setRange使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dr.inference.distribution.DistributionLikelihood
的用法示例。
在下文中一共展示了DistributionLikelihood.setRange方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: parseXMLObject
import dr.inference.distribution.DistributionLikelihood; //導入方法依賴的package包/類
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
final XMLObject cxo = xo.getChild(DISTRIBUTION);
ParametricDistributionModel model = (ParametricDistributionModel) cxo.getChild(ParametricDistributionModel.class);
DistributionLikelihood likelihood = new DistributionLikelihood(model);
XMLObject cxo1 = xo.getChild(DATA);
final int from = cxo1.getAttribute(FROM, -1);
int to = cxo1.getAttribute(TO, -1);
if (from >= 0 || to >= 0) {
if (to < 0) {
to = Integer.MAX_VALUE;
}
if (!(from >= 0 && to >= 0 && from < to)) {
throw new XMLParseException("ill formed from-to");
}
likelihood.setRange(from, to);
}
for (int j = 0; j < cxo1.getChildCount(); j++) {
if (cxo1.getChild(j) instanceof Statistic) {
likelihood.addData((Statistic) cxo1.getChild(j));
} else {
throw new XMLParseException("illegal element in " + cxo1.getName() + " element");
}
}
return likelihood;
}