Next: Providing the function to solve, Previous: Root Finding Caveats, Up: One dimensional Root-Finding [Index]
This function returns a pointer to a newly allocated instance of a solver of type T. For example, the following code creates an instance of a bisection solver,
const gsl_root_fsolver_type * T = gsl_root_fsolver_bisection; gsl_root_fsolver * s = gsl_root_fsolver_alloc (T);
If there is insufficient memory to create the solver then the function
returns a null pointer and the error handler is invoked with an error
code of GSL_ENOMEM
.
This function returns a pointer to a newly allocated instance of a derivative-based solver of type T. For example, the following code creates an instance of a Newton-Raphson solver,
const gsl_root_fdfsolver_type * T = gsl_root_fdfsolver_newton; gsl_root_fdfsolver * s = gsl_root_fdfsolver_alloc (T);
If there is insufficient memory to create the solver then the function
returns a null pointer and the error handler is invoked with an error
code of GSL_ENOMEM
.
This function initializes, or reinitializes, an existing solver s to use the function f and the initial search interval [x_lower, x_upper].
This function initializes, or reinitializes, an existing solver s to use the function and derivative fdf and the initial guess root.
These functions free all the memory associated with the solver s.
These functions return a pointer to the name of the solver. For example,
printf ("s is a '%s' solver\n", gsl_root_fsolver_name (s));
would print something like s is a 'bisection' solver
.
Next: Providing the function to solve, Previous: Root Finding Caveats, Up: One dimensional Root-Finding [Index]