23 #include "testing/testing.h"
25 using namespace libmv;
31 typedef Vec2 FMatrixType;
32 typedef Vec3 XMatrixType;
35 fx << 0.19 *
x(0) + 0.19 *
x(1) *
x(1) +
x(2),
41 jacobian << 0.19, 2 * 0.19 *
x(1), 1.0, 3 *
cos(
x(0)), -2 *
sin(
x(1)), 0;
46 TEST(FunctionDerivative, SimpleCase) {
48 x << 0.76026643, 0.01799744, 0.55192142;
51 EXPECT_MATRIX_NEAR(f.J(
x), J(
x), 1
e-8);
54 EXPECT_MATRIX_NEAR(f.J(
x), J_forward(
x), 1
e-5);
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
TEST(PolynomialCameraIntrinsics2, ApplyOnFocalCenter)
Eigen::Matrix< double, 2, 3 > Mat23