public class Bracket extends Object
Constructor and Description |
---|
Bracket(Function f)
Create a root bracketer for the given function.
|
Bracket(Function f,
int iterations)
Create a root bracketer for the given function.
|
Modifier and Type | Method and Description |
---|---|
double[] |
bracketOut(double lower,
double initial,
double upper)
Bracket a root for the target function by creating and continuously
expanding an interval around the initial point until the
interval is known to contain at least one root.
|
Function |
getFunction()
Access the target function.
|
int |
getMaximumIterations()
Access the maximum number of iterations.
|
void |
setFunction(Function f)
Modify the target function.
|
void |
setMaximumIterations(int iterations)
Modify the maximum number of iterations.
|
public Bracket(Function f)
f
- the target function.public Bracket(Function f, int iterations)
f
- the target function.iterations
- maximum number of iterations.public double[] bracketOut(double lower, double initial, double upper) throws NumericException
lower
- the lowest possible lower bound for the bracketting
interval. The lower bound for the returned interval will never be
smaller than lower.initial
- the start point used to create the bracketting interval.upper
- the largest possible upper bound for the bracketting
interval. The upper bound for the returned interval will never be
larger than upper.NumericException
- if a root could not be bracketed.public Function getFunction()
public int getMaximumIterations()
public void setFunction(Function f)
f
- the new target function.public void setMaximumIterations(int iterations)
iterations
- the new maximum number of iterations.Jas4pp 1.5 © Java Analysis Studio for Particle Physics