From 316bde9427d7c694e630276141d4da43610ebf0f Mon Sep 17 00:00:00 2001 From: dellaert Date: Wed, 3 Dec 2014 16:51:22 +0100 Subject: [PATCH] Example --- GTSAM-Concepts.md | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/GTSAM-Concepts.md b/GTSAM-Concepts.md index 9b848bf51..c22563168 100644 --- a/GTSAM-Concepts.md +++ b/GTSAM-Concepts.md @@ -102,14 +102,30 @@ Examples An example of implementing a Manifold is here: + // GTSAM type + class Rot2 { + ... + class Chart { + ... + } + } namespace gtsam { namespace traits { - // types: - template - struct SomeAssociatedType::type - + template<> + struct DefaultChart { + typedef Rot2::Chart type; + } + + template<> + struct Manifold { + typedef Rot2 type; + } + + template<> + struct Vector { + typedef Vector2 type; } }