## gov.sandia.cognition.learning.algorithm.root Interface RootFinder

All Superinterfaces:
AnytimeAlgorithm<InputOutputPair<Double,Double>>, BatchLearner<Evaluator<Double,Double>,InputOutputPair<Double,Double>>, Cloneable, CloneableSerializable, IterativeAlgorithm, Serializable, StoppableAlgorithm
All Known Implementing Classes:
AbstractBracketedRootFinder, AbstractRootFinder, MinimizerBasedRootFinder, RootFinderBisectionMethod, RootFinderFalsePositionMethod, RootFinderNewtonsMethod, RootFinderRiddersMethod, RootFinderSecantMethod

```@PublicationReference(author="Wikipedia",
title="Root-finding algorithm",
type=WebPage,
year=2009,
url="http://en.wikipedia.org/wiki/Root-finding_algorithm")
public interface RootFinderextends BatchLearner<Evaluator<Double,Double>,InputOutputPair<Double,Double>>, AnytimeAlgorithm<InputOutputPair<Double,Double>>```

Defines the functionality of a root-finding algorithm. That is, an algorithm that finds a solutions of a scalar function where it equals zero, find "x" such that f(x)=0, also known as the zero crossing. These algorithms are generally iterative and approximate, and thus have a tunable tolerance parameter.

Since:
3.0
Author:
Kevin R. Dixon

Method Summary
` double` `getInitialGuess()`
Sets the initial guess of the root (zero-crossing), which is supplied as input to the function to find the zero-crossings of.
` double` `getTolerance()`
Gets the tolerance of the algorithm.
` void` `setInitialGuess(double intitialGuess)`
Sets the initial guess of the root (zero-crossing), which is supplied as input to the function to find the zero-crossings of.
` void` `setTolerance(double tolerance)`
Sets the tolerance of the algorithm.

Methods inherited from interface gov.sandia.cognition.learning.algorithm.BatchLearner
`learn`

Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
`clone`

Methods inherited from interface gov.sandia.cognition.algorithm.AnytimeAlgorithm
`getMaxIterations, getResult, setMaxIterations`

Methods inherited from interface gov.sandia.cognition.algorithm.IterativeAlgorithm
`addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener`

Methods inherited from interface gov.sandia.cognition.algorithm.StoppableAlgorithm
`isResultValid, stop`

Method Detail

### getInitialGuess

`double getInitialGuess()`
Sets the initial guess of the root (zero-crossing), which is supplied as input to the function to find the zero-crossings of.

Returns:
Initial guess of the root location.

### setInitialGuess

`void setInitialGuess(double intitialGuess)`
Sets the initial guess of the root (zero-crossing), which is supplied as input to the function to find the zero-crossings of.

Parameters:
`intitialGuess` - Initial guess of the root location.

### getTolerance

`double getTolerance()`
Gets the tolerance of the algorithm.

Returns:
Tolerance, where tolerances closer to zero are more accurate, and larger tolerances are less accurate. In any case, tolerance must be greater than or equal to zero.

### setTolerance

`void setTolerance(double tolerance)`
Sets the tolerance of the algorithm. Smaller tolerances may yield more accurate estimates but spend more computation finding them.

Parameters:
`tolerance` - Tolerance, where tolerances closer to zero are more accurate, and larger tolerances are less accurate. In any case, tolerance must be greater than or equal to zero.