VectorSpace.h
Go to the documentation of this file.
1 /*
2  * VectorSpace.h
3  *
4  * @date December 21, 2014
5  * @author Mike Bosse
6  * @author Frank Dellaert
7  */
8 
9 #pragma once
10 
11 #include <gtsam/base/Lie.h>
12 
13 namespace gtsam {
14 
17 };
18 
19 template<typename T> struct traits;
20 
21 namespace internal {
22 
24 template<class Class, int N>
26 
32  static int GetDimension(const Class&) { return N;}
33 
34  static TangentVector Local(const Class& origin, const Class& other,
35  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
36  if (H1) *H1 = - Jacobian::Identity();
37  if (H2) *H2 = Jacobian::Identity();
38  Class v = other-origin;
39  return v.vector();
40  }
41 
42  static Class Retract(const Class& origin, const TangentVector& v,
43  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
44  if (H1) *H1 = Jacobian::Identity();
45  if (H2) *H2 = Jacobian::Identity();
46  return origin + v;
47  }
48 
50 
53 
54  static TangentVector Logmap(const Class& m, ChartJacobian Hm = {}) {
55  if (Hm) *Hm = Jacobian::Identity();
56  return m.vector();
57  }
58 
59  static Class Expmap(const TangentVector& v, ChartJacobian Hv = {}) {
60  if (Hv) *Hv = Jacobian::Identity();
61  return Class(v);
62  }
63 
64  static Class Compose(const Class& v1, const Class& v2, ChartJacobian H1 = {},
65  ChartJacobian H2 = {}) {
66  if (H1) *H1 = Jacobian::Identity();
67  if (H2) *H2 = Jacobian::Identity();
68  return v1 + v2;
69  }
70 
71  static Class Between(const Class& v1, const Class& v2, ChartJacobian H1 = {},
72  ChartJacobian H2 = {}) {
73  if (H1) *H1 = - Jacobian::Identity();
74  if (H2) *H2 = Jacobian::Identity();
75  return v2 - v1;
76  }
77 
78  static Class Inverse(const Class& v, ChartJacobian H = {}) {
79  if (H) *H = - Jacobian::Identity();
80  return -v;
81  }
82 
84 };
85 
87 template<class Class>
89 
92  static Class Compose(const Class& v1, const Class& v2) { return v1+v2;}
93  static Class Between(const Class& v1, const Class& v2) { return v2-v1;}
94  static Class Inverse(const Class& m) { return -m;}
96 
99  typedef Eigen::VectorXd TangentVector;
101  static int GetDimension(const Class& m) { return m.dim();}
102 
103  static Eigen::MatrixXd Eye(const Class& m) {
104  int dim = GetDimension(m);
105  return Eigen::MatrixXd::Identity(dim, dim);
106  }
107 
108  static TangentVector Local(const Class& origin, const Class& other,
109  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
110  if (H1) *H1 = - Eye(origin);
111  if (H2) *H2 = Eye(other);
112  Class v = other-origin;
113  return v.vector();
114  }
115 
116  static Class Retract(const Class& origin, const TangentVector& v,
117  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
118  if (H1) *H1 = Eye(origin);
119  if (H2) *H2 = Eye(origin);
120  return origin + v;
121  }
122 
124 
127 
128  static TangentVector Logmap(const Class& m, ChartJacobian Hm = {}) {
129  if (Hm) *Hm = Eye(m);
130  return m.vector();
131  }
132 
133  static Class Expmap(const TangentVector& v, ChartJacobian Hv = {}) {
134  Class result(v);
135  if (Hv)
136  *Hv = Eye(v);
137  return result;
138  }
139 
140  static Class Compose(const Class& v1, const Class& v2, ChartJacobian H1,
141  ChartJacobian H2 = {}) {
142  if (H1) *H1 = Eye(v1);
143  if (H2) *H2 = Eye(v2);
144  return v1 + v2;
145  }
146 
147  static Class Between(const Class& v1, const Class& v2, ChartJacobian H1,
148  ChartJacobian H2 = {}) {
149  if (H1) *H1 = - Eye(v1);
150  if (H2) *H2 = Eye(v2);
151  return v2 - v1;
152  }
153 
154  static Class Inverse(const Class& v, ChartJacobian H) {
155  if (H) *H = -Eye(v);
156  return -v;
157  }
158 
160 };
161 
163 template<class Class>
165 
166  inline constexpr static auto dim = Class::dimension;
167 
170 
172  p = Class::Identity(); // identity
173  q = p + p; // addition
174  q = p - p; // subtraction
175  v = p.vector(); // conversion to vector
176  q = p + v; // addition of a vector on the right
177  }
178 };
179 
184 template<class Class>
185 struct VectorSpaceTraits: VectorSpaceImpl<Class, Class::dimension> {
186 
187  // Check that Class has the necessary machinery
189 
191 
195  static Class Identity() { return Class::Identity();}
197 
200  inline constexpr static auto dimension = Class::dimension;
203 };
204 
206 template<class Class>
207 struct VectorSpace: Testable<Class>, VectorSpaceTraits<Class> {};
208 
211 template<typename Scalar>
212 struct ScalarTraits : VectorSpaceImpl<Scalar, 1> {
213 
215 
218  static void Print(Scalar m, const std::string& str = "") {
219  gtsam::print(m, str);
220  }
221  static bool Equals(Scalar v1, Scalar v2, double tol = 1e-8) {
222  return std::abs(v1 - v2) < tol;
223  }
225 
229  static Scalar Identity() { return 0;}
231 
235  inline constexpr static auto dimension = 1;
238 
240  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
241  if (H1) (*H1)[0] = -1.0;
242  if (H2) (*H2)[0] = 1.0;
244  result(0) = other - origin;
245  return result;
246  }
247 
249  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
250  if (H1) (*H1)[0] = 1.0;
251  if (H2) (*H2)[0] = 1.0;
252  return origin + v[0];
253  }
255 
259  if (H) (*H)[0] = 1.0;
260  return Local(0, m);
261  }
262 
263  static Scalar Expmap(const TangentVector& v, ChartJacobian H = {}) {
264  if (H) (*H)[0] = 1.0;
265  return v[0];
266  }
268 
269 };
270 
271 } // namespace internal
272 
274 template<> struct traits<double> : public internal::ScalarTraits<double> {
275 };
276 
278 template<> struct traits<float> : public internal::ScalarTraits<float> {
279 };
280 
281 // traits for any fixed double Eigen matrix
282 template<int M, int N, int Options, int MaxRows, int MaxCols>
283 struct traits<Eigen::Matrix<double, M, N, Options, MaxRows, MaxCols> > :
285  Eigen::Matrix<double, M, N, Options, MaxRows, MaxCols>, M * N> {
286 
289 
292  static void Print(const Fixed& m, const std::string& str = "") {
293  gtsam::print(Eigen::MatrixXd(m), str);
294  }
295  static bool Equals(const Fixed& v1, const Fixed& v2, double tol = 1e-8) {
296  return equal_with_abs_tol(v1, v2, tol);
297  }
299 
303  static Fixed Identity() { return Fixed::Zero();}
305 
308  inline constexpr static auto dimension = M * N;
313 
314  static TangentVector Local(const Fixed& origin, const Fixed& other,
315  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
316  if (H1) (*H1) = -Jacobian::Identity();
317  if (H2) (*H2) = Jacobian::Identity();
318  TangentVector result;
319  Eigen::Map<Fixed>(result.data()) = other - origin;
320  return result;
321  }
322 
323  static Fixed Retract(const Fixed& origin, const TangentVector& v,
324  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
325  if (H1) (*H1) = Jacobian::Identity();
326  if (H2) (*H2) = Jacobian::Identity();
327  return origin + Eigen::Map<const Fixed>(v.data());
328  }
330 
333  static TangentVector Logmap(const Fixed& m, ChartJacobian H = {}) {
334  if (H) *H = Jacobian::Identity();
335  TangentVector result;
336  Eigen::Map<Fixed>(result.data()) = m;
337  return result;
338  }
339 
340  static Fixed Expmap(const TangentVector& v, ChartJacobian H = {}) {
341  Fixed m;
342  m.setZero();
343  if (H) *H = Jacobian::Identity();
344  return m + Eigen::Map<const Fixed>(v.data());
345  }
347 };
348 
349 
350 namespace internal {
351 
352 // traits for dynamic Eigen matrices
353 template<int M, int N, int Options, int MaxRows, int MaxCols>
355 
358 
361  static void Print(const Dynamic& m, const std::string& str = "") {
362  gtsam::print(Eigen::MatrixXd(m), str);
363  }
364  static bool Equals(const Dynamic& v1, const Dynamic& v2,
365  double tol = 1e-8) {
366  return equal_with_abs_tol(v1, v2, tol);
367  }
369 
373  static Dynamic Identity() {
374  throw std::runtime_error("Identity not defined for dynamic types");
375  }
377 
380  inline constexpr static auto dimension = Eigen::Dynamic;
381  typedef Eigen::VectorXd TangentVector;
382  typedef Eigen::MatrixXd Jacobian;
385 
386  static int GetDimension(const Dynamic& m) {
387  return m.rows() * m.cols();
388  }
389 
390  static Jacobian Eye(const Dynamic& m) {
391  int dim = GetDimension(m);
393  }
394 
395  static TangentVector Local(const Dynamic& m, const Dynamic& other, //
396  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
397  if (H1) *H1 = -Eye(m);
398  if (H2) *H2 = Eye(m);
400  Eigen::Map<Dynamic>(v.data(), m.rows(), m.cols()) = other - m;
401  return v;
402  }
403 
404  static Dynamic Retract(const Dynamic& m, const TangentVector& v, //
405  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
406  if (H1) *H1 = Eye(m);
407  if (H2) *H2 = Eye(m);
408  return m + Eigen::Map<const Dynamic>(v.data(), m.rows(), m.cols());
409  }
411 
414  static TangentVector Logmap(const Dynamic& m, ChartJacobian H = {}) {
415  if (H) *H = Eye(m);
417  Eigen::Map<Dynamic>(result.data(), m.cols(), m.rows()) = m;
418  return result;
419  }
420 
421  static Dynamic Expmap(const TangentVector& /*v*/, ChartJacobian H = {}) {
422  static_cast<void>(H);
423  throw std::runtime_error("Expmap not defined for dynamic types");
424  }
425 
426  static Dynamic Inverse(const Dynamic& m, ChartJacobian H = {}) {
427  if (H) *H = -Eye(m);
428  return -m;
429  }
430 
431  static Dynamic Compose(const Dynamic& v1, const Dynamic& v2,
432  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
433  if (H1) *H1 = Eye(v1);
434  if (H2) *H2 = Eye(v1);
435  return v1 + v2;
436  }
437 
438  static Dynamic Between(const Dynamic& v1, const Dynamic& v2,
439  ChartJacobian H1 = {}, ChartJacobian H2 = {}) {
440  if (H1) *H1 = -Eye(v1);
441  if (H2) *H2 = Eye(v1);
442  return v2 - v1;
443  }
445 
446 };
447 
448 } // \ internal
449 
450 // traits for fully dynamic matrix
451 template<int Options, int MaxRows, int MaxCols>
452 struct traits<Eigen::Matrix<double, -1, -1, Options, MaxRows, MaxCols> > :
453  public internal::DynamicTraits<-1, -1, Options, MaxRows, MaxCols> {
454 };
455 
456 // traits for dynamic column vector
457 template<int Options, int MaxRows, int MaxCols>
458 struct traits<Eigen::Matrix<double, -1, 1, Options, MaxRows, MaxCols> > :
459  public internal::DynamicTraits<-1, 1, Options, MaxRows, MaxCols> {
460 };
461 
462 // traits for dynamic row vector
463 template<int Options, int MaxRows, int MaxCols>
464 struct traits<Eigen::Matrix<double, 1, -1, Options, MaxRows, MaxCols> > :
465  public internal::DynamicTraits<1, -1, Options, MaxRows, MaxCols> {
466 };
467 
469 template<typename T>
470 class IsVectorSpace: public IsLieGroup<T> {
471 public:
472 
474 
476  static_assert(
478  "This type's trait does not assert it as a vector space (or derived)");
479  r = p + q;
480  r = -p;
481  r = p - q;
482  }
483 
484 private:
485  T p, q, r;
486 };
487 
488 } // namespace gtsam
489 
gtsam::internal::DynamicTraits::Retract
static Dynamic Retract(const Dynamic &m, const TangentVector &v, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:404
gtsam::OptionalJacobian< Eigen::Dynamic, Eigen::Dynamic >
Definition: OptionalJacobian.h:189
gtsam::IsVectorSpace::structure_category_tag
traits< T >::structure_category structure_category_tag
Definition: VectorSpace.h:473
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Retract
static Class Retract(const Class &origin, const TangentVector &v, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:116
H
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange[*:*] noreverse nowriteback set trange[*:*] noreverse nowriteback set urange[*:*] noreverse nowriteback set vrange[*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
Definition: gnuplot_common_settings.hh:74
gtsam::internal::ScalarTraits::TangentVector
Eigen::Matrix< double, 1, 1 > TangentVector
Definition: VectorSpace.h:236
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::TangentVector
Eigen::VectorXd TangentVector
Definition: VectorSpace.h:99
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::Print
static void Print(const Fixed &m, const std::string &str="")
Definition: VectorSpace.h:292
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
gtsam::internal::VectorSpaceImpl::Logmap
static TangentVector Logmap(const Class &m, ChartJacobian Hm={})
Definition: VectorSpace.h:54
gtsam::internal::VectorSpaceTraits::GTSAM_CONCEPT_ASSERT
GTSAM_CONCEPT_ASSERT(HasVectorSpacePrereqs< Class >)
gtsam::internal::ScalarTraits::Retract
static Scalar Retract(Scalar origin, const TangentVector &v, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:248
gtsam::internal::VectorSpaceImpl::Inverse
static Class Inverse(const Class &v, ChartJacobian H={})
Definition: VectorSpace.h:78
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
gtsam::internal::DynamicTraits::Logmap
static TangentVector Logmap(const Dynamic &m, ChartJacobian H={})
Definition: VectorSpace.h:414
gtsam::internal::VectorSpaceTraits::dimension
constexpr static auto dimension
Definition: VectorSpace.h:200
gtsam::internal::VectorSpace
VectorSpace provides both Testable and VectorSpaceTraits.
Definition: VectorSpace.h:207
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::GetDimension
static int GetDimension(const Class &m)
Definition: VectorSpace.h:101
gtsam::internal::HasVectorSpacePrereqs::v
Vector v
Definition: VectorSpace.h:169
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::Jacobian
Eigen::Matrix< double, dimension, dimension > Jacobian
Definition: VectorSpace.h:311
gtsam::internal::HasVectorSpacePrereqs::dim
constexpr static auto dim
Definition: VectorSpace.h:166
gtsam::internal::DynamicTraits::Dynamic
Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > Dynamic
Definition: VectorSpace.h:357
gtsam::internal::VectorSpaceTraits
Definition: VectorSpace.h:185
gtsam::internal::DynamicTraits::dimension
constexpr static auto dimension
Definition: VectorSpace.h:380
gtsam::internal::DynamicTraits::Jacobian
Eigen::MatrixXd Jacobian
Definition: VectorSpace.h:382
gtsam::equal_with_abs_tol
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
Definition: base/Matrix.h:80
gtsam::internal::ScalarTraits::Equals
static bool Equals(Scalar v1, Scalar v2, double tol=1e-8)
Definition: VectorSpace.h:221
gtsam::internal::ScalarTraits::Identity
static Scalar Identity()
Definition: VectorSpace.h:229
gtsam::Matrix
Eigen::MatrixXd Matrix
Definition: base/Matrix.h:39
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::ChartJacobian
OptionalJacobian< Eigen::Dynamic, Eigen::Dynamic > ChartJacobian
Definition: VectorSpace.h:100
gtsam::internal::VectorSpaceImpl::ChartJacobian
OptionalJacobian< N, N > ChartJacobian
Definition: VectorSpace.h:30
gtsam::internal::DynamicTraits::Inverse
static Dynamic Inverse(const Dynamic &m, ChartJacobian H={})
Definition: VectorSpace.h:426
gtsam::internal::VectorSpaceImpl
VectorSpaceTraits Implementation for Fixed sizes.
Definition: VectorSpace.h:25
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:39
result
Values result
Definition: OdometryOptimize.cpp:8
gtsam::internal::ScalarTraits::Expmap
static Scalar Expmap(const TangentVector &v, ChartJacobian H={})
Definition: VectorSpace.h:263
gtsam::internal::DynamicTraits::Expmap
static Dynamic Expmap(const TangentVector &, ChartJacobian H={})
Definition: VectorSpace.h:421
gtsam::IsVectorSpace
Vector Space concept.
Definition: VectorSpace.h:470
gtsam::internal::VectorSpaceImpl::Retract
static Class Retract(const Class &origin, const TangentVector &v, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:42
gtsam::internal::DynamicTraits::Local
static TangentVector Local(const Dynamic &m, const Dynamic &other, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:395
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::ChartJacobian
OptionalJacobian< dimension, dimension > ChartJacobian
Definition: VectorSpace.h:312
gtsam::internal::VectorSpaceTraits::group_flavor
additive_group_tag group_flavor
Definition: VectorSpace.h:194
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:156
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Between
static Class Between(const Class &v1, const Class &v2)
Definition: VectorSpace.h:93
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::Logmap
static TangentVector Logmap(const Fixed &m, ChartJacobian H={})
Definition: VectorSpace.h:333
gtsam::IsVectorSpace::p
T p
Definition: VectorSpace.h:485
gtsam::internal::VectorSpaceImpl::TangentVector
Eigen::Matrix< double, N, 1 > TangentVector
Definition: VectorSpace.h:29
gtsam::internal::DynamicTraits::Compose
static Dynamic Compose(const Dynamic &v1, const Dynamic &v2, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:431
gtsam::internal::VectorSpaceImpl::Between
static Class Between(const Class &v1, const Class &v2, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:71
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Compose
static Class Compose(const Class &v1, const Class &v2)
Definition: VectorSpace.h:92
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::Retract
static Fixed Retract(const Fixed &origin, const TangentVector &v, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:323
gtsam::internal::ScalarTraits::structure_category
vector_space_tag structure_category
Definition: VectorSpace.h:214
gtsam::vector_space_tag
tag to assert a type is a vector space
Definition: VectorSpace.h:16
gtsam::internal::ScalarTraits::Logmap
static TangentVector Logmap(Scalar m, ChartJacobian H={})
Definition: VectorSpace.h:258
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::Identity
static Fixed Identity()
Definition: VectorSpace.h:303
gtsam::internal::ScalarTraits::Print
static void Print(Scalar m, const std::string &str="")
Definition: VectorSpace.h:218
Eigen::Dynamic
const int Dynamic
Definition: Constants.h:22
gtsam::IsLieGroup
Definition: Lie.h:260
gtsam::internal::VectorSpaceImpl::Local
static TangentVector Local(const Class &origin, const Class &other, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:34
Class::dimension
constexpr static auto dimension
Definition: testExpression.cpp:118
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::Fixed
Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > Fixed
Definition: VectorSpace.h:288
gtsam::internal::HasVectorSpacePrereqs::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(HasVectorSpacePrereqs)
Definition: VectorSpace.h:171
gtsam::IsVectorSpace::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(IsVectorSpace)
Definition: VectorSpace.h:475
gtsam::internal::VectorSpaceImpl::Jacobian
Eigen::Matrix< double, N, N > Jacobian
Definition: VectorSpace.h:31
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Inverse
static Class Inverse(const Class &m)
Definition: VectorSpace.h:94
gtsam::additive_group_tag
Definition: Group.h:34
m
Matrix3f m
Definition: AngleAxis_mimic_euler.cpp:1
gtsam::internal::DynamicTraits::GetDimension
static int GetDimension(const Dynamic &m)
Definition: VectorSpace.h:386
Eigen::Triplet< double >
gtsam::internal::VectorSpaceTraits::Identity
static Class Identity()
Definition: VectorSpace.h:195
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Compose
static Class Compose(const Class &v1, const Class &v2, ChartJacobian H1, ChartJacobian H2={})
Definition: VectorSpace.h:140
Eigen::Map
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:94
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Inverse
static Class Inverse(const Class &v, ChartJacobian H)
Definition: VectorSpace.h:154
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::Equals
static bool Equals(const Fixed &v1, const Fixed &v2, double tol=1e-8)
Definition: VectorSpace.h:295
str
Definition: pytypes.h:1558
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::ManifoldType
Fixed ManifoldType
Definition: VectorSpace.h:309
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::structure_category
vector_space_tag structure_category
Definition: VectorSpace.h:287
gtsam::internal::DynamicTraits::ManifoldType
Dynamic ManifoldType
Definition: VectorSpace.h:384
gtsam::internal::DynamicTraits::Between
static Dynamic Between(const Dynamic &v1, const Dynamic &v2, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:438
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Between
static Class Between(const Class &v1, const Class &v2, ChartJacobian H1, ChartJacobian H2={})
Definition: VectorSpace.h:147
gtsam::internal::DynamicTraits::TangentVector
Eigen::VectorXd TangentVector
Definition: VectorSpace.h:381
Lie.h
Base class and basic functions for Lie types.
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::TangentVector
Eigen::Matrix< double, dimension, 1 > TangentVector
Definition: VectorSpace.h:310
gtsam
traits
Definition: SFMdata.h:40
gtsam::Testable
Definition: Testable.h:152
gtsam::internal::ScalarTraits
Definition: VectorSpace.h:212
gtsam::internal::DynamicTraits::Print
static void Print(const Dynamic &m, const std::string &str="")
Definition: VectorSpace.h:361
Class::Identity
static Class Identity()
Definition: testExpression.cpp:121
gtsam::traits
Definition: Group.h:36
gtsam::internal::HasVectorSpacePrereqs::p
Class p
Definition: VectorSpace.h:168
gtsam::OptionalJacobian
Definition: OptionalJacobian.h:38
gtsam::IsVectorSpace::r
T r
Definition: VectorSpace.h:485
gtsam::internal::DynamicTraits::ChartJacobian
OptionalJacobian< dimension, dimension > ChartJacobian
Definition: VectorSpace.h:383
gtsam::internal::HasVectorSpacePrereqs
Requirements on type to pass it to Manifold template below.
Definition: VectorSpace.h:164
Class
Definition: testExpression.cpp:116
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Logmap
static TangentVector Logmap(const Class &m, ChartJacobian Hm={})
Definition: VectorSpace.h:128
gtsam::internal::ScalarTraits::ManifoldType
Scalar ManifoldType
Definition: VectorSpace.h:234
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::group_flavor
additive_group_tag group_flavor
Definition: VectorSpace.h:302
origin
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set origin
Definition: gnuplot_common_settings.hh:45
gtsam::internal::HasVectorSpacePrereqs::q
Class q
Definition: VectorSpace.h:168
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Eye
static Eigen::MatrixXd Eye(const Class &m)
Definition: VectorSpace.h:103
gtsam::internal::VectorSpaceImpl::Compose
static Class Compose(const Class &v1, const Class &v2, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:64
v2
Vector v2
Definition: testSerializationBase.cpp:39
gtsam::internal::ScalarTraits::Local
static TangentVector Local(Scalar origin, Scalar other, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:239
gtsam::lie_group_tag
tag to assert a type is a Lie group
Definition: Lie.h:164
gtsam::internal::VectorSpaceTraits::ManifoldType
Class ManifoldType
Definition: VectorSpace.h:201
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
gtsam::internal::DynamicTraits::group_flavor
additive_group_tag group_flavor
Definition: VectorSpace.h:372
gtsam::internal::VectorSpaceImpl::Expmap
static Class Expmap(const TangentVector &v, ChartJacobian Hv={})
Definition: VectorSpace.h:59
gtsam::tol
const G double tol
Definition: Group.h:79
gtsam.examples.DogLegOptimizerExample.float
float
Definition: DogLegOptimizerExample.py:113
Eigen::Matrix< double, N, 1 >
abs
#define abs(x)
Definition: datatypes.h:17
gtsam::internal::VectorSpaceTraits::structure_category
vector_space_tag structure_category
Definition: VectorSpace.h:190
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::Local
static TangentVector Local(const Fixed &origin, const Fixed &other, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:314
N
#define N
Definition: igam.h:9
internal
Definition: BandTriangularSolver.h:13
gtsam::internal::ScalarTraits::dimension
constexpr static auto dimension
Definition: VectorSpace.h:235
gtsam::internal::ScalarTraits::ChartJacobian
OptionalJacobian< 1, 1 > ChartJacobian
Definition: VectorSpace.h:237
gtsam::internal::DynamicTraits
Definition: VectorSpace.h:354
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Local
static TangentVector Local(const Class &origin, const Class &other, ChartJacobian H1={}, ChartJacobian H2={})
Definition: VectorSpace.h:108
gtsam::internal::VectorSpaceImpl::GetDimension
static int GetDimension(const Class &)
Definition: VectorSpace.h:32
Class::vector
const Vector3 & vector() const
Definition: testExpression.cpp:120
gtsam::traits< Eigen::Matrix< double, M, N, Options, MaxRows, MaxCols > >::Expmap
static Fixed Expmap(const TangentVector &v, ChartJacobian H={})
Definition: VectorSpace.h:340
gtsam::IsVectorSpace::q
T q
Definition: VectorSpace.h:485
test_callbacks.value
value
Definition: test_callbacks.py:160
pybind_wrapper_test_script.other
other
Definition: pybind_wrapper_test_script.py:42
gtsam::internal::DynamicTraits::Eye
static Jacobian Eye(const Dynamic &m)
Definition: VectorSpace.h:390
gtsam::internal::DynamicTraits::Identity
static Dynamic Identity()
Definition: VectorSpace.h:373
gtsam::internal::DynamicTraits::Equals
static bool Equals(const Dynamic &v1, const Dynamic &v2, double tol=1e-8)
Definition: VectorSpace.h:364
v1
Vector v1
Definition: testSerializationBase.cpp:38
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
gtsam::internal::DynamicTraits::structure_category
vector_space_tag structure_category
Definition: VectorSpace.h:356
gtsam::internal::VectorSpaceImpl< Class, Eigen::Dynamic >::Expmap
static Class Expmap(const TangentVector &v, ChartJacobian Hv={})
Definition: VectorSpace.h:133
M
Matrix< RealScalar, Dynamic, Dynamic > M
Definition: bench_gemm.cpp:51
gtsam::internal::ScalarTraits::group_flavor
additive_group_tag group_flavor
Definition: VectorSpace.h:228


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:18:23