use of org.apache.commons.math3.analysis.integration.BaseAbstractUnivariateIntegrator in project gatk by broadinstitute.
the class CNLOHCaller method calcEffectiveAlpha.
protected double calcEffectiveAlpha(final double[] effectivePhis) {
final QAlphaUnivariateFunction qAlpha = new QAlphaUnivariateFunction(effectivePhis);
final AQAlphaUnivariateFunction aQAlpha = new AQAlphaUnivariateFunction(effectivePhis);
final BaseAbstractUnivariateIntegrator integrator = new SimpsonIntegrator();
final double numerator = integrator.integrate(10, aQAlpha, MIN_E_ELPHA_INTEGRATION_RANGE, MAX_E_ELPHA_INTEGRATION_RANGE);
final double denominator = integrator.integrate(10, qAlpha, MIN_E_ELPHA_INTEGRATION_RANGE, MAX_E_ELPHA_INTEGRATION_RANGE);
return numerator / denominator;
}
use of org.apache.commons.math3.analysis.integration.BaseAbstractUnivariateIntegrator in project gatk-protected by broadinstitute.
the class CNLOHCaller method calcEffectiveAlpha.
protected double calcEffectiveAlpha(final double[] effectivePhis) {
final QAlphaUnivariateFunction qAlpha = new QAlphaUnivariateFunction(effectivePhis);
final AQAlphaUnivariateFunction aQAlpha = new AQAlphaUnivariateFunction(effectivePhis);
final BaseAbstractUnivariateIntegrator integrator = new SimpsonIntegrator();
final double numerator = integrator.integrate(10, aQAlpha, MIN_E_ELPHA_INTEGRATION_RANGE, MAX_E_ELPHA_INTEGRATION_RANGE);
final double denominator = integrator.integrate(10, qAlpha, MIN_E_ELPHA_INTEGRATION_RANGE, MAX_E_ELPHA_INTEGRATION_RANGE);
return numerator / denominator;
}
Aggregations