Honeycomb  0.1
Component-Model Framework
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
honey::BisectN< Real, Dim > Class Template Reference

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, RealVec
 
typedef function< Real(Vec)> Func
 
typedef array< Func, Dim > Funcs
 

Public Member Functions

 BisectN (Real tol=Real_::zeroTol, int depthMax=30)
 
tuple< bool, Vecroot (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
 

Detailed Description

template<class Real, int Dim>
class honey::BisectN< Real, 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.

Member Typedef Documentation

template<class Real , int Dim>
typedef function<Real (Vec)> honey::BisectN< Real, Dim >::Func
template<class Real , int Dim>
typedef array<Func, Dim> honey::BisectN< Real, Dim >::Funcs
template<class Real , int Dim>
typedef Vec<Dim, Real> honey::BisectN< Real, Dim >::Vec

Constructor & Destructor Documentation

template<class Real , int Dim>
honey::BisectN< Real, Dim >::BisectN ( Real  tol = Real_::zeroTol,
int  depthMax = 30 
)
inline
Parameters
tolFind root to within tolerance of zero
depthMaxTree is explored one path at a time using a stack, requires depthMax nodes.

Member Function Documentation

template<class Real , int Dim>
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].

Parameters
funcs
minroot lower bound
maxroot upper bound
Return values
foundif not found a best guess is returned
root

Member Data Documentation

template<class Real , int Dim>
const int honey::BisectN< Real, Dim >::dim = Dim
static

The documentation for this class was generated from the following files: