derivatives for LieScalar compose

release/4.3a0
Duy-Nguyen Ta 2013-08-16 16:26:31 +00:00
parent 84e9c1655d
commit 0cdb233e5f
1 changed files with 15 additions and 1 deletions

View File

@ -68,7 +68,11 @@ namespace gtsam {
}
/** compose with another object */
LieScalar compose(const LieScalar& p) const {
LieScalar compose(const LieScalar& p,
boost::optional<Matrix&> H1=boost::none,
boost::optional<Matrix&> H2=boost::none) const {
if(H1) *H1 = eye(1);
if(H2) *H2 = eye(1);
return LieScalar(d_ + p.d_);
}
@ -94,6 +98,16 @@ namespace gtsam {
/** Logmap around identity - just returns with default cast back */
static Vector Logmap(const LieScalar& p) { return Vector_(1,p.value()); }
/// Left-trivialized derivative of the exponential map
static Matrix dexpL(const Vector& v) {
return eye(1);
}
/// Left-trivialized derivative inverse of the exponential map
static Matrix dexpInvL(const Vector& v) {
return eye(1);
}
private:
double d_;
};