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
-
| Class | A type satisfying GTSAM's manifold traits. |
|
|
| 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.
|