21 #include <boost/function.hpp> 23 #pragma GCC diagnostic push 24 #pragma GCC diagnostic ignored "-Wunused-variable" 26 #include <boost/bind.hpp> 28 #pragma GCC diagnostic pop 63 template<
class Y,
class X=
double>
77 template <class X, int N = traits<X>::dimension>
79 boost::function<
double(
const X&)>
h,
const X&
x,
double delta = 1
e-5) {
80 double factor = 1.0 / (2.0 *
delta);
82 BOOST_STATIC_ASSERT_MSG(
84 "Template argument X must be a manifold type.");
85 BOOST_STATIC_ASSERT_MSG(
N>0,
"Template argument X must be fixed-size type or N must be specified.");
93 for (
int j = 0;
j <
N;
j++) {
99 g(
j) = (hxplus - hxmin) * factor;
116 template <class Y, class X, int N = traits<X>::dimension>
119 boost::function<
Y(
const X&)>
h,
const X&
x,
double delta = 1
e-5) {
123 "Template argument Y must be a manifold type.");
127 "Template argument X must be a manifold type.");
128 BOOST_STATIC_ASSERT_MSG(
N>0,
"Template argument X must be fixed-size type or N must be specified.");
135 const typename TraitsY::TangentVector zeroY = TraitsY::Local(hx, hx);
136 const size_t m = zeroY.size();
143 Matrix
H = Matrix::Zero(m,
N);
144 const double factor = 1.0 / (2.0 *
delta);
145 for (
int j = 0;
j <
N;
j++) {
147 const auto dy1 = TraitsY::Local(hx,
h(TraitsX::Retract(x, dx)));
149 const auto dy2 = TraitsY::Local(hx,
h(TraitsX::Retract(x, dx)));
151 H.col(
j) << (dy1 - dy2) * factor;
157 template<
class Y,
class X>
160 return numericalDerivative11<Y, X>(boost::bind(
h, _1),
x,
delta);
172 template<class Y, class X1, class X2, int N = traits<X1>::dimension>
176 "Template argument Y must be a manifold type.");
178 "Template argument X1 must be a manifold type.");
179 return numericalDerivative11<Y, X1, N>(boost::bind(
h, _1, boost::cref(x2)),
x1,
delta);
183 template<
class Y,
class X1,
class X2>
186 return numericalDerivative21<Y, X1, X2>(boost::bind(
h, _1, _2),
x1,
x2,
delta);
198 template<class Y, class X1, class X2, int N = traits<X2>::dimension>
204 "Template argument X2 must be a manifold type.");
205 return numericalDerivative11<Y, X2, N>(boost::bind(
h, boost::cref(x1), _1),
x2,
delta);
209 template<
class Y,
class X1,
class X2>
212 return numericalDerivative22<Y, X1, X2>(boost::bind(
h, _1, _2),
x1,
x2,
delta);
226 template<class Y, class X1, class X2, class X3, int N = traits<X1>::dimension>
228 boost::function<
Y(
const X1&,
const X2&,
const X3&)>
h,
const X1&
x1,
231 "Template argument Y must be a manifold type.");
233 "Template argument X1 must be a manifold type.");
234 return numericalDerivative11<Y, X1, N>(boost::bind(
h, _1, boost::cref(x2), boost::cref(x3)),
x1,
delta);
237 template<
class Y,
class X1,
class X2,
class X3>
240 return numericalDerivative31<Y, X1, X2, X3>(boost::bind(
h, _1, _2, _3),
x1,
255 template<class Y, class X1, class X2, class X3, int N = traits<X2>::dimension>
257 boost::function<
Y(
const X1&,
const X2&,
const X3&)>
h,
const X1&
x1,
260 "Template argument Y must be a manifold type.");
262 "Template argument X2 must be a manifold type.");
263 return numericalDerivative11<Y, X2, N>(boost::bind(
h, boost::cref(x1), _1, boost::cref(x3)),
x2,
delta);
266 template<
class Y,
class X1,
class X2,
class X3>
269 return numericalDerivative32<Y, X1, X2, X3>(boost::bind(
h, _1, _2, _3),
x1,
284 template<class Y, class X1, class X2, class X3, int N = traits<X3>::dimension>
286 boost::function<
Y(
const X1&,
const X2&,
const X3&)>
h,
const X1&
x1,
289 "Template argument Y must be a manifold type.");
291 "Template argument X3 must be a manifold type.");
292 return numericalDerivative11<Y, X3, N>(boost::bind(
h, boost::cref(x1), boost::cref(x2), _1),
x3,
delta);
295 template<
class Y,
class X1,
class X2,
class X3>
298 return numericalDerivative33<Y, X1, X2, X3>(boost::bind(
h, _1, _2, _3),
x1,
313 template<class Y, class X1, class X2, class X3, class X4, int N = traits<X1>::dimension>
315 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&)>
h,
const X1&
x1,
318 "Template argument Y must be a manifold type.");
320 "Template argument X1 must be a manifold type.");
321 return numericalDerivative11<Y, X1, N>(boost::bind(
h, _1, boost::cref(x2), boost::cref(x3), boost::cref(x4)),
x1,
delta);
324 template<
class Y,
class X1,
class X2,
class X3,
class X4>
327 return numericalDerivative41<Y, X1, X2, X3, X4>(boost::bind(
h, _1, _2, _3, _4),
x1,
x2,
x3,
x4);
341 template<class Y, class X1, class X2, class X3, class X4, int N = traits<X2>::dimension>
343 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&)>
h,
const X1&
x1,
346 "Template argument Y must be a manifold type.");
348 "Template argument X2 must be a manifold type.");
349 return numericalDerivative11<Y, X2, N>(boost::bind(
h, boost::cref(x1), _1, boost::cref(x3), boost::cref(x4)),
x2,
delta);
352 template<
class Y,
class X1,
class X2,
class X3,
class X4>
355 return numericalDerivative42<Y, X1, X2, X3, X4>(boost::bind(
h, _1, _2, _3, _4),
x1,
x2,
x3,
x4);
369 template<class Y, class X1, class X2, class X3, class X4, int N = traits<X3>::dimension>
371 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&)>
h,
const X1&
x1,
374 "Template argument Y must be a manifold type.");
376 "Template argument X3 must be a manifold type.");
377 return numericalDerivative11<Y, X3, N>(boost::bind(
h, boost::cref(x1), boost::cref(x2), _1, boost::cref(x4)),
x3,
delta);
380 template<
class Y,
class X1,
class X2,
class X3,
class X4>
383 return numericalDerivative43<Y, X1, X2, X3, X4>(boost::bind(
h, _1, _2, _3, _4),
x1,
x2,
x3,
x4);
397 template<class Y, class X1, class X2, class X3, class X4, int N = traits<X4>::dimension>
399 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&)>
h,
const X1&
x1,
402 "Template argument Y must be a manifold type.");
404 "Template argument X4 must be a manifold type.");
405 return numericalDerivative11<Y, X4, N>(boost::bind(
h, boost::cref(x1), boost::cref(x2), boost::cref(x3), _1),
x4,
delta);
408 template<
class Y,
class X1,
class X2,
class X3,
class X4>
411 return numericalDerivative44<Y, X1, X2, X3, X4>(boost::bind(
h, _1, _2, _3, _4),
x1,
x2,
x3,
x4);
426 template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X1>::dimension>
428 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&)>
h,
const X1&
x1,
431 "Template argument Y must be a manifold type.");
433 "Template argument X1 must be a manifold type.");
434 return numericalDerivative11<Y, X1, N>(boost::bind(
h, _1, boost::cref(x2), boost::cref(x3), boost::cref(x4), boost::cref(x5)),
x1,
delta);
437 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5>
440 return numericalDerivative51<Y, X1, X2, X3, X4, X5>(boost::bind(
h, _1, _2, _3, _4, _5),
x1,
x2,
x3,
x4,
x5);
455 template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X2>::dimension>
457 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&)>
h,
const X1&
x1,
460 "Template argument Y must be a manifold type.");
462 "Template argument X1 must be a manifold type.");
463 return numericalDerivative11<Y, X2, N>(boost::bind(
h, boost::cref(x1), _1, boost::cref(x3), boost::cref(x4), boost::cref(x5)),
x2,
delta);
466 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5>
469 return numericalDerivative52<Y, X1, X2, X3, X4, X5>(boost::bind(
h, _1, _2, _3, _4, _5),
x1,
x2,
x3,
x4,
x5);
484 template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X3>::dimension>
486 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&)>
h,
const X1&
x1,
489 "Template argument Y must be a manifold type.");
491 "Template argument X1 must be a manifold type.");
492 return numericalDerivative11<Y, X3, N>(boost::bind(
h, boost::cref(x1), boost::cref(x2), _1, boost::cref(x4), boost::cref(x5)),
x3,
delta);
495 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5>
498 return numericalDerivative53<Y, X1, X2, X3, X4, X5>(boost::bind(
h, _1, _2, _3, _4, _5),
x1,
x2,
x3,
x4,
x5);
513 template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X4>::dimension>
515 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&)>
h,
const X1&
x1,
518 "Template argument Y must be a manifold type.");
520 "Template argument X1 must be a manifold type.");
521 return numericalDerivative11<Y, X4, N>(boost::bind(
h, boost::cref(x1), boost::cref(x2), boost::cref(x3), _1, boost::cref(x5)),
x4,
delta);
524 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5>
527 return numericalDerivative54<Y, X1, X2, X3, X4, X5>(boost::bind(
h, _1, _2, _3, _4, _5),
x1,
x2,
x3,
x4,
x5);
542 template<class Y, class X1, class X2, class X3, class X4, class X5, int N = traits<X5>::dimension>
544 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&)>
h,
const X1&
x1,
547 "Template argument Y must be a manifold type.");
549 "Template argument X1 must be a manifold type.");
550 return numericalDerivative11<Y, X5, N>(boost::bind(
h, boost::cref(x1), boost::cref(x2), boost::cref(x3), boost::cref(x4), _1),
x5,
delta);
553 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5>
556 return numericalDerivative55<Y, X1, X2, X3, X4, X5>(boost::bind(
h, _1, _2, _3, _4, _5),
x1,
x2,
x3,
x4,
x5);
572 template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X1>::dimension>
574 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&,
const X6&)>
h,
const X1&
x1,
575 const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
577 "Template argument Y must be a manifold type.");
579 "Template argument X1 must be a manifold type.");
580 return numericalDerivative11<Y, X1, N>(boost::bind(
h, _1, boost::cref(x2), boost::cref(x3), boost::cref(x4), boost::cref(x5), boost::cref(x6)),
x1,
delta);
583 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5,
class X6>
585 const X1&
x1,
const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
586 return numericalDerivative61<Y, X1, X2, X3, X4, X5, X6>(boost::bind(
h, _1, _2, _3, _4, _5, _6),
x1,
x2,
x3,
x4,
x5, x6);
602 template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X2>::dimension>
604 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&,
const X6&)>
h,
const X1&
x1,
605 const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
607 "Template argument Y must be a manifold type.");
609 "Template argument X1 must be a manifold type.");
610 return numericalDerivative11<Y, X2, N>(boost::bind(
h, boost::cref(x1), _1, boost::cref(x3), boost::cref(x4), boost::cref(x5), boost::cref(x6)),
x2,
delta);
613 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5,
class X6>
615 const X1&
x1,
const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
616 return numericalDerivative62<Y, X1, X2, X3, X4, X5, X6>(boost::bind(
h, _1, _2, _3, _4, _5, _6),
x1,
x2,
x3,
x4,
x5, x6);
632 template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X3>::dimension>
634 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&,
const X6&)>
h,
const X1&
x1,
635 const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
637 "Template argument Y must be a manifold type.");
639 "Template argument X1 must be a manifold type.");
640 return numericalDerivative11<Y, X3, N>(boost::bind(
h, boost::cref(x1), boost::cref(x2), _1, boost::cref(x4), boost::cref(x5), boost::cref(x6)),
x3,
delta);
643 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5,
class X6>
645 const X1&
x1,
const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
646 return numericalDerivative63<Y, X1, X2, X3, X4, X5, X6>(boost::bind(
h, _1, _2, _3, _4, _5, _6),
x1,
x2,
x3,
x4,
x5, x6);
662 template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X4>::dimension>
664 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&,
const X6&)>
h,
const X1&
x1,
665 const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
667 "Template argument Y must be a manifold type.");
669 "Template argument X1 must be a manifold type.");
670 return numericalDerivative11<Y, X4, N>(boost::bind(
h, boost::cref(x1), boost::cref(x2), boost::cref(x3), _1, boost::cref(x5), boost::cref(x6)),
x4,
delta);
673 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5,
class X6>
675 const X1&
x1,
const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
676 return numericalDerivative64<Y, X1, X2, X3, X4, X5>(boost::bind(
h, _1, _2, _3, _4, _5, _6),
x1,
x2,
x3,
x4,
x5, x6);
692 template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X5>::dimension>
694 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&,
const X6&)>
h,
const X1&
x1,
695 const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
697 "Template argument Y must be a manifold type.");
699 "Template argument X1 must be a manifold type.");
700 return numericalDerivative11<Y, X5, N>(boost::bind(
h, boost::cref(x1), boost::cref(x2), boost::cref(x3), boost::cref(x4), _1, boost::cref(x6)),
x5,
delta);
703 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5,
class X6>
705 const X1&
x1,
const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
706 return numericalDerivative65<Y, X1, X2, X3, X4, X5, X6>(boost::bind(
h, _1, _2, _3, _4, _5, _6),
x1,
x2,
x3,
x4,
x5, x6);
722 template<class Y, class X1, class X2, class X3, class X4, class X5, class X6, int N = traits<X6>::dimension>
724 boost::function<
Y(
const X1&,
const X2&,
const X3&,
const X4&,
const X5&,
const X6&)>
h,
725 const X1&
x1,
const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
728 "Template argument Y must be a manifold type.");
730 "Template argument X1 must be a manifold type.");
731 return numericalDerivative11<Y, X6, N>(boost::bind(
h, boost::cref(x1), boost::cref(x2), boost::cref(x3), boost::cref(x4), boost::cref(x5), _1), x6,
delta);
734 template<
class Y,
class X1,
class X2,
class X3,
class X4,
class X5,
class X6>
736 const X1&
x1,
const X2&
x2,
const X3&
x3,
const X4&
x4,
const X5&
x5,
const X6& x6,
double delta = 1
e-5) {
737 return numericalDerivative66<Y, X1, X2, X3, X4, X5, X6>(boost::bind(
h, _1, _2, _3, _4, _5, _6),
x1,
x2,
x3,
x4,
x5, x6);
752 "Template argument X must be a manifold type.");
754 typedef boost::function<double(const X&)>
F;
755 typedef boost::function<VectorD(F, const X&, double)>
G;
756 G ng =
static_cast<G
>(numericalGradient<X> );
757 return numericalDerivative11<VectorD, X>(boost::bind(ng,
f, _1,
delta),
x,
770 template<
class X1,
class X2>
772 const boost::function<double(const X1&, const X2&)>&
f_;
780 f_(
f), x1_(x1), delta_(delta) {
783 return numericalGradient<X1>(boost::bind(f_, _1, boost::cref(x2)), x1_, delta_);
787 template<
class X1,
class X2>
789 boost::function<
double(
const X1&,
const X2&)>
f,
const X1&
x1,
const X2&
x2,
793 return numericalDerivative11<Vector, X2>(
794 boost::function<Vector(const X2&)>(
798 template<
class X1,
class X2>
805 template<
class X1,
class X2>
807 boost::function<
double(
const X1&,
const X2&)>
f,
const X1&
x1,
const X2&
x2,
812 Vector (*numGrad)(boost::function<double(const X1&)>,
const X1&,
813 double) = &numericalGradient<X1>;
814 boost::function<double(const X1&)>
f2(boost::bind(
f, _1, boost::cref(x2)));
816 return numericalDerivative11<Vector, X1>(
817 boost::function<Vector(const X1&)>(boost::bind(numGrad, f2, _1,
delta)),
821 template<
class X1,
class X2>
828 template<
class X1,
class X2>
830 boost::function<
double(
const X1&,
const X2&)>
f,
const X1&
x1,
const X2&
x2,
833 Vector (*numGrad)(boost::function<double(const X2&)>,
const X2&,
834 double) = &numericalGradient<X2>;
835 boost::function<double(const X2&)>
f2(boost::bind(
f, boost::cref(x1), _1));
837 return numericalDerivative11<Vector, X2>(
838 boost::function<Vector(const X2&)>(boost::bind(numGrad, f2, _1,
delta)),
842 template<
class X1,
class X2>
853 template<
class X1,
class X2,
class X3>
855 boost::function<
double(
const X1&,
const X2&,
const X3&)>
f,
const X1&
x1,
858 Vector (*numGrad)(boost::function<double(const X1&)>,
const X1&,
859 double) = &numericalGradient<X1>;
860 boost::function<double(const X1&)>
f2(boost::bind(
f, _1, boost::cref(x2), boost::cref(x3)));
862 return numericalDerivative11<Vector, X1>(
863 boost::function<Vector(const X1&)>(boost::bind(numGrad, f2, _1,
delta)),
867 template<
class X1,
class X2,
class X3>
871 boost::function<
double(
const X1&,
const X2&,
const X3&)>(
f), x1, x2, x3,
876 template<
class X1,
class X2,
class X3>
878 boost::function<
double(
const X1&,
const X2&,
const X3&)>
f,
const X1&
x1,
881 Vector (*numGrad)(boost::function<double(const X2&)>,
const X2&,
882 double) = &numericalGradient<X2>;
883 boost::function<double(const X2&)>
f2(boost::bind(
f, boost::cref(x1), _1, boost::cref(x3)));
885 return numericalDerivative11<Vector, X2>(
886 boost::function<Vector(const X2&)>(boost::bind(numGrad, f2, _1,
delta)),
890 template<
class X1,
class X2,
class X3>
894 boost::function<
double(
const X1&,
const X2&,
const X3&)>(
f), x1, x2, x3,
899 template<
class X1,
class X2,
class X3>
901 boost::function<
double(
const X1&,
const X2&,
const X3&)>
f,
const X1&
x1,
904 Vector (*numGrad)(boost::function<double(const X3&)>,
const X3&,
905 double) = &numericalGradient<X3>;
906 boost::function<double(const X3&)>
f2(boost::bind(
f, boost::cref(x1), boost::cref(x2), _1));
908 return numericalDerivative11<Vector, X3>(
909 boost::function<Vector(const X3&)>(boost::bind(numGrad, f2, _1,
delta)),
913 template<
class X1,
class X2,
class X3>
917 boost::function<
double(
const X1&,
const X2&,
const X3&)>(
f), x1, x2, x3,
922 template<
class X1,
class X2,
class X3>
924 boost::function<
double(
const X1&,
const X2&,
const X3&)>
f,
const X1&
x1,
926 return numericalHessian212<X1, X2>(
927 boost::function<double(const X1&, const X2&)>(boost::bind(
f, _1, _2, boost::cref(x3))),
931 template<
class X1,
class X2,
class X3>
933 boost::function<
double(
const X1&,
const X2&,
const X3&)>
f,
const X1&
x1,
935 return numericalHessian212<X1, X3>(
936 boost::function<double(const X1&, const X3&)>(boost::bind(
f, _1, boost::cref(x2), _2)),
940 template<
class X1,
class X2,
class X3>
942 boost::function<
double(
const X1&,
const X2&,
const X3&)>
f,
const X1&
x1,
944 return numericalHessian212<X2, X3>(
945 boost::function<double(const X2&, const X3&)>(boost::bind(
f, boost::cref(x1), _1, _2)),
950 template<
class X1,
class X2,
class X3>
954 boost::function<
double(
const X1&,
const X2&,
const X3&)>(
f), x1, x2, x3,
958 template<
class X1,
class X2,
class X3>
962 boost::function<
double(
const X1&,
const X2&,
const X3&)>(
f), x1, x2, x3,
966 template<
class X1,
class X2,
class X3>
970 boost::function<
double(
const X1&,
const X2&,
const X3&)>(
f), x1, x2, x3,
internal::FixedSizeMatrix< X, X >::type numericalHessian(boost::function< double(const X &)> f, const X &x, double delta=1e-5)
tag to assert a type is a manifold
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
internal::FixedSizeMatrix< X2, X2 >::type numericalHessian222(boost::function< double(const X1 &, const X2 &)> f, const X1 &x1, const X2 &x2, double delta=1e-5)
internal::FixedSizeMatrix< Y, X6 >::type numericalDerivative66(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative53(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
A non-templated config holding any types of Manifold-group elements.
internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative54(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
JacobiRotation< float > G
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative61(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
internal::FixedSizeMatrix< X1, X1 >::type numericalHessian211(boost::function< double(const X1 &, const X2 &)> f, const X1 &x1, const X2 &x2, double delta=1e-5)
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative33(boost::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Pose3 x2(Rot3::Ypr(0.0, 0.0, 0.0), l2)
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative31(boost::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const boost::function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double delta=1e-5)
double f2(const Vector2 &x)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange[*:*] noreverse nowriteback set trange[*:*] noreverse nowriteback set urange[*:*] noreverse nowriteback set vrange[*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative42(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative51(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative52(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Eigen::Matrix< double, traits< Y >::dimension, traits< X >::dimension > type
void g(const string &key, int i)
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative62(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
internal::FixedSizeMatrix< X3, X3 >::type numericalHessian333(boost::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative32(boost::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(boost::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
internal::FixedSizeMatrix< Y, X5 >::type numericalDerivative65(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
internal::FixedSizeMatrix< X1 >::type Vector
internal::FixedSizeMatrix< X1, X2 >::type numericalHessian212(boost::function< double(const X1 &, const X2 &)> f, const X1 &x1, const X2 &x2, double delta=1e-5)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const boost::function< double(const X1 &, const X2 &)> & f_
Eigen::Matrix< double, N, 1 > numericalGradient(boost::function< double(const X &)> h, const X &x, double delta=1e-5)
Numerically compute gradient of scalar function.
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative63(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
Base class and basic functions for Lie types.
Pose3 x3(Rot3::Ypr(M_PI/4.0, 0.0, 0.0), l2)
internal::FixedSizeMatrix< X1, X2 >::type numericalHessian312(boost::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative43(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative41(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)
internal::FixedSizeMatrix< X2, X2 >::type numericalHessian322(boost::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
internal::FixedSizeMatrix< X2, X3 >::type numericalHessian323(boost::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
internal::FixedSizeMatrix< X1, X3 >::type numericalHessian313(boost::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
internal::FixedSizeMatrix< Y, X5 >::type numericalDerivative55(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, double delta=1e-5)
Vector operator()(const X2 &x2)
G_x1(const boost::function< double(const X1 &, const X2 &)> &f, const X1 &x1, double delta)
internal::FixedSizeMatrix< X1, X1 >::type numericalHessian311(boost::function< double(const X1 &, const X2 &, const X3 &)> f, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative64(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &, const X5 &, const X6 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, const X5 &x5, const X6 &x6, double delta=1e-5)
internal::FixedSizeMatrix< Y, X >::type numericalDerivative11(boost::function< Y(const X &)> h, const X &x, double delta=1e-5)
New-style numerical derivatives using manifold_traits.
The matrix class, also used for vectors and row-vectors.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
internal::FixedSizeMatrix< Y, X4 >::type numericalDerivative44(boost::function< Y(const X1 &, const X2 &, const X3 &, const X4 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, const X4 &x4, double delta=1e-5)