Honeycomb
0.1
Component-Model Framework
|
Find the root of a set of functions by the bisection method. ie. Finds (x,y,...) where all functions return 0. More...
#include <BisectN.h>
Public Types | |
typedef Vec< Dim, Real > | Vec |
typedef function< Real(Vec)> | Func |
typedef array< Func, Dim > | Funcs |
Public Member Functions | |
BisectN (Real tol=Real_::zeroTol, int depthMax=30) | |
tuple< bool, Vec > | root (const Funcs &funcs, const Vec &min, const Vec &max) |
Find the root of a set of functions within bounds [min,max]. More... | |
Static Public Attributes | |
static const int | dim = Dim |
Find the root of a set of functions by the bisection method. ie. Finds (x,y,...) where all functions return 0.
Bisection should only be used if the function to be evaluated is monotonic over the range [min,max], ie. the function is either increasing or decreasing over the range.
typedef function<Real (Vec)> honey::BisectN< Real, Dim >::Func |
typedef array<Func, Dim> honey::BisectN< Real, Dim >::Funcs |
typedef Vec<Dim, Real> honey::BisectN< Real, Dim >::Vec |
|
inline |
tol | Find root to within tolerance of zero |
depthMax | Tree is explored one path at a time using a stack, requires depthMax nodes. |
auto honey::BisectN< Real, Dim >::root | ( | const Funcs & | funcs, |
const Vec & | min, | ||
const Vec & | max | ||
) |
Find the root of a set of functions within bounds [min,max].
funcs | |
min | root lower bound |
max | root upper bound |
found | if not found a best guess is returned |
root |
|
static |