List of usage examples for org.apache.commons.math.analysis UnivariateRealSolver solve
double solve(double min, double max, double startValue) throws ConvergenceException, FunctionEvaluationException;
From source file:org.jcurl.model.ComputedPaths.java
static double firstHit(final R1RnCurve a, final R1RnCurve b, double tmin, double tmax) throws FunctionEvaluationException { final DistanceSq dist = new DistanceSq(a, b); final UnivariateRealSolver solver = new NewtonSolver(dist); try {/*from w ww. jav a 2s. c om*/ return solver.solve(tmin, tmax, tmin + 1e-2); } catch (ConvergenceException e) { return Never; } }