![]() |
OGS
|
Use the regula falsi method to find the root of some scalar function of one variable.
#include <Root1D.h>
Public Member Functions | |
RegulaFalsi (Function &&f, double a, double b) | |
void | step (const unsigned num_steps) |
Do num_steps iteration of regula falsi. | |
double | getResult () const |
Returns the current estimate of the root. | |
double | getRange () const |
Returns the size of the current search interval. |
Private Attributes | |
Function | f_ |
double | a_ |
double | b_ |
double | fa_ |
double | fb_ |
|
inline |
Initializes finding a root of the Function
f
in the interval [a
, b
].
Definition at line 53 of file Root1D.h.
References a_, MathLib::Nonlinear::detail::almost_zero(), b_, f_, fa_, fb_, OGS_FATAL, and MathLib::Nonlinear::detail::same_sign().
|
inline |
|
inline |
|
inline |
Do num_steps
iteration of regula falsi.
Definition at line 76 of file Root1D.h.
References a_, MathLib::Nonlinear::detail::almost_zero(), b_, f_, fa_, fb_, MathLib::s, and MathLib::Nonlinear::detail::same_sign().
|
private |
Definition at line 127 of file Root1D.h.
Referenced by RegulaFalsi(), getRange(), getResult(), and step().
|
private |
Definition at line 127 of file Root1D.h.
Referenced by RegulaFalsi(), getRange(), getResult(), and step().
|
private |
Definition at line 126 of file Root1D.h.
Referenced by RegulaFalsi(), and step().
|
private |
Definition at line 127 of file Root1D.h.
Referenced by RegulaFalsi(), getResult(), and step().
|
private |
Definition at line 127 of file Root1D.h.
Referenced by RegulaFalsi(), getResult(), and step().