#include <Secant.h>
Collaboration diagram for SecantSolve0< functor, real >:

Definition at line 13 of file Secant.h.
Public Member Functions | |
| bool | get_boundary_solution () const |
| returns _boundary_solution | |
| void | set_check_boundary (bool check_boundary) |
| used to turn boundary checking on or off | |
| void | set_min_x (real min_x) |
| used to set the minimum of the solution set | |
| void | set_max_x (real max_x) |
| used to set the maximum of the solution set | |
| real | get_x_converge () const |
| used to retrieve the convergance value | |
| real | get_f_converge () const |
| used to retrieve the final value of f | |
| functor & | get_functor () |
| this returns a reference to the parent object with the hidden variables | |
| bool | get_converged () const |
| returns if converged | |
| SecantSolve0 (real X0, real X1, real Fsolve, real Epsilon, unsigned int max_iter, functor &obj, real(functor::*f)(real), bool check_boundary=false, real min_x=0, real max_x=0) | |
| This constructor sets everything needed by the algorithm. | |
| void | do_iteration (bool print_results) |
| This function does the calculations. | |
Protected Member Functions | |
| int | check_boundary (real &x, real df_dx) |
| this returns the number of times the bounaries have been hit. If boundaries are hit more than twice, then the loop is stoped. | |
Protected Attributes | |
| int | _max_iter |
| the maximum number of iterations of the routine | |
| real | _x0 |
| the first seed value | |
| real | _x1 |
| the second seed value | |
| real | _Fsolve |
| the value of F to be solved. Usually this is 0. It is almost always 0, in the academic literature. | |
| real | _epsilon |
| the convergence parameter. The calculations stop when F(x) < epsilon | |
| real(functor::* | _f )(real) |
| this is the function whose 0 is being solved | |
| functor & | _obj |
| this is the object used to calculate the functions | |
| bool | _check_boundary |
| if true, then the search for the zero, has boundaries | |
| real | _min_x |
| this is the minimum value of the acceptible range | |
| real | _max_x |
| this is the maximum value of the acceptible range | |
| real | _x_converge |
| the value of x such that f(x) = 0 +/- epsilon | |
| real | _f_converge |
| the last value of f | |
| vector< real > | _x |
| the sequence of x's | |
| vector< real > | _F_x |
| the sequence of f_x's | |
| vector< real > | _abs_Err_F_x |
| the sequence of abs(f_x)'s | |
| vector< real > | _dF_x |
| the sequence of df_x's | |
| bool | _converged |
| a boolean which is true, if convergance occurs | |
| bool | _diverged |
| a boolean which is true if the sequence diverged | |
| bool | _boundary_solution |
| true if the final x is on the bounday | |
| int | _number_boundary_hits |
| the number of times a boundary has been hit | |
| bool | _lower_boundary_hit |
| the number of times the lower boundary has been hit | |
| bool | _upper_boundary_hit |
| the number of times the uper boundary has been hit | |
| bool | _boundary_hit |
| true if the last iteration hit the boundary | |
1.5.1