Added derivative version of LieVector::between

release/4.3a0
Richard Roberts 2011-01-18 02:38:03 +00:00
parent 711e8c0a32
commit 7bfbb6b829
1 changed files with 5 additions and 1 deletions

View File

@ -89,7 +89,11 @@ namespace gtsam {
} }
/** between operation */ /** between operation */
inline LieVector between(const LieVector& l2) const { inline LieVector between(const LieVector& l2,
boost::optional<Matrix&> H1=boost::none,
boost::optional<Matrix&> H2=boost::none) const {
if(H1) *H1 = -eye(dim());
if(H2) *H2 = eye(l2.dim());
return LieVector(l2.vector() - vector()); return LieVector(l2.vector() - vector());
} }