gtsam
Loading...
Searching...
No Matches
gtsam::AsVectorSpace< Class > Class Template Reference

Detailed Description

template<class Class>
class gtsam::AsVectorSpace< Class >

Opt-in adapter that equips a manifold class with additive vector-space operations.

The default-constructed wrapped value is chosen as the additive identity. Addition and subtraction use the wrapped manifold's Local and Retract maps. This is useful when an application deliberately chooses a local affine embedding for a type, such as a camera calibration, that has no natural group composition. Cumulative Lie-group splines require composition, inverse, Expmap, and Logmap operations, but calibration classes intentionally expose only manifold Local and Retract operations: composing two camera intrinsic matrices is not physically meaningful. This wrapper makes the modeling choice explicit by defining addition in coordinates about the default-constructed value. It is a local affine approximation, not a claim that the wrapped type has a natural global vector-space structure.

Template Parameters
ClassA type satisfying GTSAM's manifold traits.
Inheritance diagram for gtsam::AsVectorSpace< Class >:

Public Member Functions

 AsVectorSpace ()
 Construct the selected additive identity.
 AsVectorSpace (const Class &value)
 Wrap an existing manifold value.
 AsVectorSpace (const TangentVector &tangent)
 Retract a tangent vector from the selected identity.
AsVectorSpace operator+ (const AsVectorSpace &other) const
 Add another wrapped value using its coordinates about the identity.
AsVectorSpace operator- (const AsVectorSpace &other) const
 Subtract another wrapped value using its coordinates about the identity.
AsVectorSpace operator- () const
 Negate the wrapped value's coordinates about the identity.
AsVectorSpace operator+ (const TangentVector &tangent) const
 Retract a tangent increment from the current wrapped value.
AsVectorSpace operator- (const TangentVector &tangent) const
 Retract a negated tangent increment from the current wrapped value.
TangentVector vector () const
 Return coordinates relative to the selected additive identity.

Static Public Member Functions

static AsVectorSpace Identity ()
 Return the selected additive identity.

Static Public Attributes

static constexpr int dimension = traits<Class>::dimension
 Compile-time dimension inherited from the wrapped manifold.

Public Types

using TangentVector = typename traits<Class>::TangentVector
 Tangent coordinates supplied by the wrapped manifold traits.

The documentation for this class was generated from the following file: