28 template <
typename Real>
33 MinimizeN(
int dimensions, std::function<Real(Real
const*)>
const& F,
34 int maxLevel,
int maxBracket,
int maxIterations);
41 void GetMinimum(Real
const*
t0, Real
const*
t1, Real
const* tInitial,
42 Real* tMin, Real& fMin);
50 void ComputeDomain(Real
const* t0, Real
const* t1, Real& ell0,
66 template <
typename Real>
68 std::function<Real(Real
const*)>
const& F,
int maxLevel,
int maxBracket,
88 direction.SetSize(dimensions);
92 template <
typename Real>
94 Real
const* tInitial, Real* tMin, Real& fMin)
108 Real ell0, ell1, ellMin;
116 mMinimizer.GetMinimum(ell0, ell1, (Real)0, ellMin, mFCurr);
124 Real
const epsilon = (Real)1e-06;
125 if (length < epsilon)
137 mMinimizer.GetMinimum(ell0, ell1, (Real)0, ellMin, mFCurr);
144 mDirections[i] = mDirections[i + 1];
155 template <
typename Real>
157 Real& ell0, Real& ell1)
159 ell0 = -std::numeric_limits<Real>::max();
160 ell1 = +std::numeric_limits<Real>::max();
165 if (value != (Real)0)
167 Real b0 = t0[i] -
mTCurr[i];
168 Real b1 = t1[i] - mTCurr[i];
169 Real inv = ((Real)1) /
value;
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
void ComputeDomain(Real const *t0, Real const *t1, Real &ell0, Real &ell1)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
GLsizei const GLfloat * value
Minimize1< Real > mMinimizer
void GetMinimum(Real const *t0, Real const *t1, Real const *tInitial, Real *tMin, Real &fMin)
std::vector< GVector< Real > > mDirections
GLuint GLsizei GLsizei * length
DualQuaternion< Real > Length(DualQuaternion< Real > const &d, bool robust=false)
std::function< Real(Real const *)> mFunction
void Memcpy(void *target, void const *source, size_t count)
MinimizeN(int dimensions, std::function< Real(Real const *)> const &F, int maxLevel, int maxBracket, int maxIterations)