Function Mechatronix::minCubic¶
Defined in File Mechatronix.hh
Function Documentation¶
-
bool
Mechatronix
::
minCubic
(real_type f0, real_type Df0, real_type l, real_type fl, real_type p, real_type fp, real_type smin, real_type smax, real_type &l_opt)¶
-
Find the minimum of a cubic passing by 3 points and initial tangent.
The cubic \( p(x) = p_0 + p'_0 x + c x^2 + d x^3 \) satisfy
\[ p(0) = p_0, \quad p'(0)= p'_0, \quad p(a) = p_a, \quad p(b) = p_b \]The minimum is searched in the interval\[ [s_{\min}b,s_{\max}b] \]and thus satisfy\[ x = \arg\min \{p(z) \,|\, z\in[s_{\min}b,s_{\max}b] \} \]- Parameters
-
f0 – the value \( f(0) \)
Df0 – the value \( f'(0) \)
l – the value \( l \)
fl – the value \( f(l) \)
p – the value \( p \)
fp – the value \( f(p) \)
smin – the value \( s_{\min} \)
smax – the value \( s_{\max} \)
l_opt – theparameter with the minimum
- Returns
-
true if minimum found