Class NewtonRootFinder
- java.lang.Object
-
- net.sf.tweety.math.opt.rootFinder.RootFinder
-
- net.sf.tweety.math.opt.rootFinder.NewtonRootFinder
-
public class NewtonRootFinder extends RootFinder
This class implements the Newton method for finding zeros of a function.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_FIX_ITERATIONS
The maximum number of fixing iterations.static double
PRECISION
The precision of the approximation.
-
Constructor Summary
Constructors Constructor Description NewtonRootFinder()
Creates a new Newton root finder for the given starting point and the given function
-
Method Summary
-
Methods inherited from class net.sf.tweety.math.opt.rootFinder.RootFinder
getFunctions, getStartingPoint, setStartingPoint
-
-
-
-
Field Detail
-
PRECISION
public static final double PRECISION
The precision of the approximation. The actual used precision depends on the number of variables.- See Also:
- Constant Field Values
-
MAX_FIX_ITERATIONS
public static final int MAX_FIX_ITERATIONS
The maximum number of fixing iterations.- See Also:
- Constant Field Values
-
-
Method Detail
-
randomRoot
public java.util.Map<Variable,Term> randomRoot(java.util.List<Term> functions, java.util.Map<Variable,Term> startingPoint) throws GeneralMathException
Description copied from class:RootFinder
Determines the values for the variables appearing in the function such the function evaluates to zero.- Specified by:
randomRoot
in classRootFinder
- Parameters:
functions
- the functionsstartingPoint
- the starting point for the search- Returns:
- a map from variables to terms such that "function" evaluates to zero.
- Throws:
GeneralMathException
- if something went wrong.
-
-