14 template<
class Real,
int Dim>
22 typedef function<Real (Vec)>
Func;
25 static const int dim = Dim;
31 BisectN(
Real tol = Real_::zeroTol,
int depthMax = 30) : _tol(tol), _depthMax(depthMax) { _nodes.reserve(_depthMax); }
41 tuple<bool,Vec> root(
const Funcs& funcs,
const Vec& min,
const Vec& max);
44 static const int childCount = 1 <<
dim;
57 static Vec corner(
const Vec& min,
const Vec& max,
int index);
58 static tuple<Vec,Vec> child(
const Vec& min,
const Vec& max,
const Vec& center,
int index);
66 array<Vec, childCount> _corners;
67 array<array<Real, childCount>, dim> _funcsCorners;
70 extern template class BisectN<Float, 2>;
71 extern template class BisectN<Float, 3>;
72 extern template class BisectN<Double, 2>;
73 extern template class BisectN<Double, 3>;
Algebra.
Definition: Alge.h:13
Vec< Dim, Real > Vec
Definition: BisectN.h:21
BisectN(Real tol=Real_::zeroTol, int depthMax=30)
Definition: BisectN.h:31
float Real
Real number type. See Real_ for real number operations and constants.
Definition: Real.h:21
Numeric type information, use numeral() to get instance safely from a static context.
Definition: Numeral.h:17
function< Real(Vec)> Func
Definition: BisectN.h:22
Find the root of a set of functions by the bisection method. ie. Finds (x,y,...) where all functions ...
Definition: BisectN.h:15
static const int dim
Definition: BisectN.h:25
array< Func, Dim > Funcs
Definition: BisectN.h:23
Global Honeycomb namespace.