OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
findroot.h
Go to the documentation of this file.
1
13
14#ifndef FINDROOT_H
15#define FINDROOT_H
16
25typedef void (*newton_callback)(double x, double* f, double* df, void* p);
26
33typedef double (*ridder_callback)(double x, void* p);
34
45int findroot_Newton(double x1, double x2, double* rts, double xacc, newton_callback func, void* p);
46
56double findroot_Ridder(double x1, double x2, double xacc, ridder_callback func, void* p);
57
58#endif //FINDROOT_H
double(* ridder_callback)(double x, void *p)
Callback function for Ridder's root finder.
Definition findroot.h:33
void(* newton_callback)(double x, double *f, double *df, void *p)
Callback function for Newton-Raphson root finder.
Definition findroot.h:25
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.
Definition findroot.c:47
double findroot_Ridder(double x1, double x2, double xacc, ridder_callback func, void *p)
Finds the root of a function using Ridder's method.
Definition findroot.c:134