OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
findroot.h
Go to the documentation of this file.
1
9#ifndef FINDROOT_H
10#define FINDROOT_H
11
20typedef void (*newton_callback) (double x, double* f, double* df, void* p);
21
28typedef double (*ridder_callback) (double x, void* p);
29
40int findroot_Newton(double x1, double x2, double* rts, double xacc, newton_callback func, void* p);
41
51double findroot_Ridder(double x1, double x2, double xacc, ridder_callback func, void* p);
52
53#endif //FINDROOT_H
double(* ridder_callback)(double x, void *p)
Callback function for Ridder's root finder.
Definition findroot.h:28
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:20
void(* newton_callback)(double x, double *f, double *df, void *p)
Callback function for Newton-Raphson root finder.
Definition findroot.h:20
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:88