![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Header file for root finding method. More...
Go to the source code of this file.
Typedefs | |
| typedef void(* | newton_callback) (double x, double *f, double *df, void *p) |
| Callback function for Newton-Raphson root finder. | |
| typedef double(* | ridder_callback) (double x, void *p) |
| Callback function for Ridder's root finder. | |
Functions | |
| int | findroot_Newton (double x1, double x2, double *rts, double xacc, newton_callback func, void *p) |
| Finds the root of a function using Newton's method. | |
| double | findroot_Ridder (double x1, double x2, double xacc, ridder_callback func, void *p) |
| Finds the root of a function using Ridder's method. | |
Header file for root finding method.
| typedef void(* newton_callback) (double x, double *f, double *df, void *p) |
Callback function for Newton-Raphson root finder.
| x | Value of the independent variable. |
| f | Value of the function at x. |
| df | Value of the derivative of the function at x. |
| p | Pointer to additional data. |
| typedef double(* ridder_callback) (double x, void *p) |
Callback function for Ridder's root finder.
| x | Value of the independent variable. |
| p | Pointer to additional data. |
| int findroot_Newton | ( | double | x1, |
| double | x2, | ||
| double * | rts, | ||
| double | xacc, | ||
| newton_callback | func, | ||
| void * | p ) |
Finds the root of a function using Newton's method.
| x1 | Lower bound of the bracketing interval. |
| x2 | Upper bound of the bracketing interval. |
| rts | Pointer to the root. |
| xacc | Desired accuracy of the root. |
| func | Callback function for the function and its derivative. |
| p | Pointer to additional data. |
Finds the root of a function using Newton's method.
| double findroot_Ridder | ( | double | x1, |
| double | x2, | ||
| double | xacc, | ||
| ridder_callback | func, | ||
| void * | p ) |
Finds the root of a function using Ridder's method.
| x1 | Lower bound of the bracketing interval. |
| x2 | Upper bound of the bracketing interval. |
| xacc | Desired accuracy of the root. |
| func | Callback function for the function. |
| p | Pointer to additional data. |
Finds the root of a function using Ridder's method.