|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.nengo.math.impl.NewtonRootFinder
public class NewtonRootFinder
Root finder that uses Newton's method. Assumes that functions are generally increasing. TODO: test
| Constructor Summary | |
|---|---|
NewtonRootFinder(int maxIterations,
boolean additiveBoundarySearch)
|
|
| Method Summary | |
|---|---|
float |
findRoot(Function function,
float startLow,
float startHigh,
float tolerance)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NewtonRootFinder(int maxIterations,
boolean additiveBoundarySearch)
maxIterations - Maximum search iterations to attempt before returning an erroradditiveBoundarySearch - If true, when low and high boundaries need to be widened, a proportion
of their difference is added/substracted. If false, they are multiplied/divided by a constant.
False is a good idea for boundaries that should not cross zero.| Method Detail |
|---|
public float findRoot(Function function,
float startLow,
float startHigh,
float tolerance)
findRoot in interface RootFinderfunction - Function f(x) to find root ofstartLow - Low-valued x from which to start searchstartHigh - High-valued x from which to start. You typically give startLow and startHigh so that
you expect the signs of the functions at these values to be different.tolerance - Max acceptable |f(x)| for which to return x
RootFinder.findRoot(ca.nengo.math.Function, float, float, float)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||