本文整理汇总了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;
}