Example
parent
c7676f1012
commit
316bde9427
|
@ -102,14 +102,30 @@ Examples
|
||||||
|
|
||||||
An example of implementing a Manifold is here:
|
An example of implementing a Manifold is here:
|
||||||
|
|
||||||
|
// GTSAM type
|
||||||
|
class Rot2 {
|
||||||
|
...
|
||||||
|
class Chart {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
namespace traits {
|
namespace traits {
|
||||||
|
|
||||||
// types:
|
template<>
|
||||||
template<typename T>
|
struct DefaultChart<Rot2> {
|
||||||
struct SomeAssociatedType<T>::type
|
typedef Rot2::Chart type;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct Manifold<Rot2::Chart> {
|
||||||
|
typedef Rot2 type;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct Vector<Rot2::Chart> {
|
||||||
|
typedef Vector2 type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue