more progress

release/4.3a0
Mike Bosse 2014-12-17 17:06:24 +01:00
parent a41d172618
commit e17baac774
2 changed files with 1 additions and 31 deletions

View File

@ -30,7 +30,6 @@ namespace gtsam {
* we can directly add double, Vector, and Matrix into values now, because of
* gtsam::traits.
*/
#if 0
struct GTSAM_EXPORT LieScalar {
enum { dimension = 1 };
@ -118,35 +117,6 @@ namespace gtsam {
private:
double d_;
};
#endif
struct GTSAM_EXPORT LieScalar {
enum { dimension = 1 };
/** default constructor */
LieScalar() : d_(0.0) {}
/** wrap a double */
/*explicit*/ LieScalar(double d) : d_(d) {}
/** access the underlying value */
double value() const { return d_; }
/** Automatic conversion to underlying value */
operator double() const { return d_; }
/** print @param name optional string naming the object */
void print(const std::string& name="") const;
/** equality up to tolerance */
bool equals(const LieScalar& expected, double tol=1e-5) const {
return fabs(expected.d_ - d_) <= tol;
}
private:
double d_;
};
template<>
struct traits_x<LieScalar> : public internal::ScalarTraits<LieScalar> {};

View File

@ -409,7 +409,7 @@ public:
*Dcamera << Dcamera_, Eigen::Matrix<double, 1, DimK>::Zero();
}
if (Dother) {
Dother->resize(1, 6+traits::dimension<CalibrationB>::value);
Dother->resize(1, 6+CalibrationB::dimension);
Dother->setZero();
Dother->block(0, 0, 1, 6) = Dother_;
}