Point2 changed to fixed size matrices. Make check works

release/4.3a0
nsrinivasan7 2014-11-30 17:24:02 -05:00
parent 73564f1170
commit d9b6aed23c
1 changed files with 2 additions and 2 deletions

View File

@ -50,12 +50,12 @@ double Point2::norm(OptionalJacobian<1,2> H) const {
} }
/* ************************************************************************* */ /* ************************************************************************* */
static const Matrix I2 = eye(2); static const Matrix2 I2 = Eigen::Matrix2d::Identity();
double Point2::distance(const Point2& point, OptionalJacobian<1,2> H1, double Point2::distance(const Point2& point, OptionalJacobian<1,2> H1,
OptionalJacobian<1,2> H2) const { OptionalJacobian<1,2> H2) const {
Point2 d = point - *this; Point2 d = point - *this;
if (H1 || H2) { if (H1 || H2) {
Eigen::Matrix<double,1,2> H; Matrix12 H;
double r = d.norm(H); double r = d.norm(H);
if (H1) *H1 = -H; if (H1) *H1 = -H;
if (H2) *H2 = H; if (H2) *H2 = H;