org.apache.commons.math3.analysis.solvers
Class AbstractPolynomialSolver

java.lang.Object
  extended by org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver<PolynomialFunction>
      extended by org.apache.commons.math3.analysis.solvers.AbstractPolynomialSolver
All Implemented Interfaces:
BaseUnivariateSolver<PolynomialFunction>, PolynomialSolver
Direct Known Subclasses:
LaguerreSolver

public abstract class AbstractPolynomialSolver
extends BaseAbstractUnivariateSolver<PolynomialFunction>
implements PolynomialSolver

Base class for solvers.

Since:
3.0
Version:
$Id: AbstractPolynomialSolver.java 1364387 2012-07-22 18:14:11Z tn $

Constructor Summary
protected AbstractPolynomialSolver(double absoluteAccuracy)
          Construct a solver with given absolute accuracy.
protected AbstractPolynomialSolver(double relativeAccuracy, double absoluteAccuracy)
          Construct a solver with given accuracies.
protected AbstractPolynomialSolver(double relativeAccuracy, double absoluteAccuracy, double functionValueAccuracy)
          Construct a solver with given accuracies.
 
Method Summary
protected  double[] getCoefficients()
           
protected  void setup(int maxEval, PolynomialFunction f, double min, double max, double startValue)
          Prepare for computation.
 
Methods inherited from class org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver
computeObjectiveValue, doSolve, getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMax, getMaxEvaluations, getMin, getRelativeAccuracy, getStartValue, incrementEvaluationCount, isBracketing, isSequence, solve, solve, solve, verifyBracketing, verifyInterval, verifySequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.math3.analysis.solvers.BaseUnivariateSolver
getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMaxEvaluations, getRelativeAccuracy, solve, solve, solve
 

Constructor Detail

AbstractPolynomialSolver

protected AbstractPolynomialSolver(double absoluteAccuracy)
Construct a solver with given absolute accuracy.

Parameters:
absoluteAccuracy - Maximum absolute error.

AbstractPolynomialSolver

protected AbstractPolynomialSolver(double relativeAccuracy,
                                   double absoluteAccuracy)
Construct a solver with given accuracies.

Parameters:
relativeAccuracy - Maximum relative error.
absoluteAccuracy - Maximum absolute error.

AbstractPolynomialSolver

protected AbstractPolynomialSolver(double relativeAccuracy,
                                   double absoluteAccuracy,
                                   double functionValueAccuracy)
Construct a solver with given accuracies.

Parameters:
relativeAccuracy - Maximum relative error.
absoluteAccuracy - Maximum absolute error.
functionValueAccuracy - Maximum function value error.
Method Detail

setup

protected void setup(int maxEval,
                     PolynomialFunction f,
                     double min,
                     double max,
                     double startValue)
Prepare for computation. Subclasses must call this method if they override any of the solve methods.

Overrides:
setup in class BaseAbstractUnivariateSolver<PolynomialFunction>
Parameters:
maxEval - Maximum number of evaluations.
f - Function to solve.
min - Lower bound for the interval.
max - Upper bound for the interval.
startValue - Start value to use.

getCoefficients

protected double[] getCoefficients()
Returns:
the coefficients of the polynomial function.


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.