#include <bracket.h>
Public Member Functions | |
bracket (Function &f, unsigned int iterations=100) | |
int | maximum_iterations () const |
void | maximum_iterations (unsigned int iterations) |
void | bracket_out (double lower, double initial, double upper) |
double | upper_bound () const |
double | lower_bound () const |
bracket< Function >::bracket | ( | Function & | f, | |
unsigned int | iterations = 100 | |||
) | [inline] |
Create a root bracketer for the given function.
f | the target function. | |
iterations | maximum number of iterations. |
int bracket< Function >::maximum_iterations | ( | ) | const [inline] |
Access the maximum number of iterations.
void bracket< Function >::maximum_iterations | ( | unsigned int | iterations | ) | [inline] |
Modify the maximum number of iterations.
iterations | the new maximum number of iterations. |
void bracket< Function >::bracket_out | ( | double | lower, | |
double | initial, | |||
double | upper | |||
) | [inline] |
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. An interval is determined to contain at least one root when the function evaluation at the inteval endpoints are oppisite signs.
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 . |
double bracket< Function >::upper_bound | ( | ) | const [inline] |
After a call to bracket_out
, returns the upper bound of the bracketing interval.
double bracket< Function >::lower_bound | ( | ) | const [inline] |
After a call to bracket_out
, returns the lower bound of the bracketing interval.