本文整理汇总了Java中org.apache.commons.math3.analysis.integration.gauss.GaussIntegratorFactory类的典型用法代码示例。如果您正苦于以下问题:Java GaussIntegratorFactory类的具体用法?Java GaussIntegratorFactory怎么用?Java GaussIntegratorFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GaussIntegratorFactory类属于org.apache.commons.math3.analysis.integration.gauss包,在下文中一共展示了GaussIntegratorFactory类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initializeIntegrationQuadrature
import org.apache.commons.math3.analysis.integration.gauss.GaussIntegratorFactory; //导入依赖的package包/类
/**
* Initilizes the quadrature for calculating allele ratio integrals in
* {@link HeterogeneousHeterozygousPileupPriorModel#getHetLogLikelihood(List)}
*
* @param numIntegPoints number of points in the quadrature
*/
private void initializeIntegrationQuadrature(final int numIntegPoints) {
/* get Gauss-Legendre quadrature factory of order @numIntegPoints */
final GaussIntegratorFactory integratorFactory = new GaussIntegratorFactory();
final GaussIntegrator gaussIntegrator = integratorFactory.legendre(numIntegPoints,
minHetAlleleFraction, 1.0 - minHetAlleleFraction);
/* abscissas */
gaussIntegrationAbscissas.clear();
gaussIntegrationAbscissas.addAll(IntStream.range(0, numIntegPoints).
mapToDouble(gaussIntegrator::getPoint).boxed().collect(Collectors.toList()));
/* weights */
gaussIntegrationWeights.clear();
gaussIntegrationWeights.addAll(IntStream.range(0, numIntegPoints).
mapToDouble(gaussIntegrator::getWeight).boxed().collect(Collectors.toList()));
/* log of weights */
gaussIntegrationLogWeights.clear();
gaussIntegrationLogWeights.addAll(gaussIntegrationWeights.stream().
mapToDouble(FastMath::log).boxed().collect(Collectors.toList()));
}
开发者ID:broadinstitute,项目名称:gatk-protected,代码行数:28,代码来源:HeterogeneousHeterozygousPileupPriorModel.java
注:本文中的org.apache.commons.math3.analysis.integration.gauss.GaussIntegratorFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论