org.apache.commons.math.analysis
Class UnivariateRealSolverFactory

java.lang.Object
  extended by org.apache.commons.math.analysis.UnivariateRealSolverFactory
Direct Known Subclasses:
UnivariateRealSolverFactoryImpl

public abstract class UnivariateRealSolverFactory
extends java.lang.Object

Abstract factory class used to create UnivariateRealSolver instances.

Solvers implementing the following algorithms are supported:

Concrete factories extending this class also specify a default solver, instances of which are returned by newDefaultSolver().

Common usage:

 SolverFactory factory = UnivariateRealSolverFactory.newInstance();

 // create a Brent solver to use with a UnivariateRealFunction f
 BrentSolver solver = factory.newBrentSolver(f);
 
Jakarta Commons Discovery is used to determine the concrete factory returned by UnivariateRealSolverFactory.newInstance(). The default is UnivariateRealSolverFactoryImpl.


Method Summary
abstract  UnivariateRealSolver newBisectionSolver(UnivariateRealFunction f)
          Create a new UnivariateRealSolver for the given function.
abstract  UnivariateRealSolver newBrentSolver(UnivariateRealFunction f)
          Create a new UnivariateRealSolver for the given function.
abstract  UnivariateRealSolver newDefaultSolver(UnivariateRealFunction f)
          Create a new UnivariateRealSolver for the given function.
static UnivariateRealSolverFactory newInstance()
          Create a new factory.
abstract  UnivariateRealSolver newNewtonSolver(DifferentiableUnivariateRealFunction f)
          Create a new UnivariateRealSolver for the given function.
abstract  UnivariateRealSolver newSecantSolver(UnivariateRealFunction f)
          Create a new UnivariateRealSolver for the given function.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static UnivariateRealSolverFactory newInstance()
Create a new factory.

Returns:
a new factory.

newDefaultSolver

public abstract UnivariateRealSolver newDefaultSolver(UnivariateRealFunction f)
Create a new UnivariateRealSolver for the given function. The actual solver returned is determined by the underlying factory.

Parameters:
f - the function.
Returns:
the new solver.

newBisectionSolver

public abstract UnivariateRealSolver newBisectionSolver(UnivariateRealFunction f)
Create a new UnivariateRealSolver for the given function. The solver is an implementation of the bisection method.

Parameters:
f - the function.
Returns:
the new solver.

newBrentSolver

public abstract UnivariateRealSolver newBrentSolver(UnivariateRealFunction f)
Create a new UnivariateRealSolver for the given function. The solver is an implementation of the Brent method.

Parameters:
f - the function.
Returns:
the new solver.

newNewtonSolver

public abstract UnivariateRealSolver newNewtonSolver(DifferentiableUnivariateRealFunction f)
Create a new UnivariateRealSolver for the given function. The solver is an implementation of Newton's Method.

Parameters:
f - the function.
Returns:
the new solver.

newSecantSolver

public abstract UnivariateRealSolver newSecantSolver(UnivariateRealFunction f)
Create a new UnivariateRealSolver for the given function. The solver is an implementation of the secant method.

Parameters:
f - the function.
Returns:
the new solver.


jHepWork 1.1 (C) Chekanov