New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 1033 - Eigen with ceres solver problem
Eigen with ceres solver problem
 Status: RESOLVED FIXED None Eigen Unclassified Interoperability (show other bugs) 3.2 All All Normal Compilation Problem Nobody

 Reported: 2015-07-02 09:16 UTC by liu liu 2015-07-17 11:24 UTC (History) 4 users (show) chtz gael.guennebaud hauke.heibel jacob.benoit.1

Attachments

 liu liu 2015-07-02 09:16:23 UTC ```the bug occurs when I try to implement the costfunction using ceres solver. template bool operator()(const T* q_cam_odo, const T* t_cam_odo, T* residuals) const { ...... JacobiSVD> svd(Anorm, ComputeFullU | ComputeFullV); ...... } but it reports a compilation error : cannot covert the first argument from int to JetT Then I follow the instructions to file /**************************************************************************** * Implementation of hypot * ****************************************************************************/ template struct hypot_impl { typedef typename NumTraits::Real RealScalar; static inline RealScalar run(const Scalar& x, const Scalar& y) { using std::max; using std::min; using std::abs; using std::sqrt; RealScalar _x = abs(x); RealScalar _y = abs(y); RealScalar p = (max)(_x, _y); if(p==RealScalar(0)) return 0; RealScalar q = (min)(_x, _y); RealScalar qp = q/p; return p * sqrt(RealScalar(1) + qp*qp); } }; I just change the expression: if(p==RealScalar(0)) return 0; to if(p==RealScalar(0)) return RealScalar(0); Thanks god, it's OK.``` Christoph Hertzberg 2015-07-17 11:24:01 UTC ```Thanks for the report. Fixed here: https://bitbucket.org/eigen/eigen/commits/6feb93c7a8ec```

 Note You need to log in before you can comment on or make changes to this bug.