29 template <
typename Real>
34 static unsigned int Find(std::function<Real(Real)>
const& F, Real
t0,
35 Real
t1,
unsigned int maxIterations, Real& root);
41 static unsigned int Find(std::function<Real(Real)>
const& F, Real t0,
42 Real t1, Real f0, Real f1,
unsigned int maxIterations, Real& root);
46 template <
typename Real>
48 Real
t0, Real
t1,
unsigned int maxIterations, Real& root)
74 for (i = 2; i <= maxIterations; ++i)
76 root = ((Real)0.5) * (t0 +
t1);
77 if (root == t0 || root == t1)
85 Real product = fm * f0;
86 if (product < (Real)0)
91 else if (product > (Real)0)
109 template <
typename Real>
111 Real
t0, Real
t1, Real f0, Real f1,
unsigned int maxIterations,
136 for (i = 2; i <= maxIterations; ++i)
138 root = ((Real)0.5) * (t0 +
t1);
139 if (root == t0 || root == t1)
147 Real product = fm * f0;
148 if (product < (Real)0)
153 else if (product >(Real)0)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
static unsigned int Find(std::function< Real(Real)> const &F, Real t0, Real t1, unsigned int maxIterations, Real &root)