Package org.apache.commons.math.analysis

Examples of org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction


   /**
     *
     */
    public void testQuinticZero() throws MathException {
        DifferentiableUnivariateRealFunction f = new QuinticFunction();
        double result;

        UnivariateRealSolver solver = new NewtonSolver();
        result = solver.solve(f, -0.2, 0.2);
        assertEquals(result, 0, solver.getAbsoluteAccuracy());
View Full Code Here


   * @param f An OG 1-D function mapping doubles to doubles, not null
   * @return A Commons differentiable univariate real function
   */
  public static DifferentiableUnivariateRealFunction wrapDifferentiable(final DoubleFunction1D f) {
    Validate.notNull(f);
    return new DifferentiableUnivariateRealFunction() {

      @Override
      public double value(final double x) throws FunctionEvaluationException {
        return f.evaluate(x);
      }
View Full Code Here

TOP

Related Classes of org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.