pub enum VariableEnum {
Rn(Variable<Rn>),
SE2(Variable<SE2>),
SE3(Variable<SE3>),
SO2(Variable<SO2>),
SO3(Variable<SO3>),
}Expand description
Enum to handle mixed manifold variable types
Variants§
Implementations§
Source§impl VariableEnum
impl VariableEnum
Sourcepub fn manifold_type(&self) -> ManifoldType
pub fn manifold_type(&self) -> ManifoldType
Get the manifold type for this variable
Sourcepub fn apply_tangent_step(&mut self, step_slice: MatRef<'_, f64>)
pub fn apply_tangent_step(&mut self, step_slice: MatRef<'_, f64>)
Apply a tangent space step to update this variable.
This method applies a manifold plus operation: x_new = x ⊞ δx where δx is a tangent vector. It supports all manifold types.
§Arguments
step_slice- View into the full step vector for this variable’s DOF
§Implementation Notes
Uses explicit clone instead of unsafe memory copy (IntoNalgebra) for small vectors.
This is safe and performant for typical manifold dimensions (1-6 DOF).
Sourcepub fn get_covariance(&self) -> Option<&Mat<f64>>
pub fn get_covariance(&self) -> Option<&Mat<f64>>
Get the covariance matrix for this variable (if computed).
Returns None if covariance has not been computed.
§Returns
Reference to the covariance matrix in tangent space
Sourcepub fn set_covariance(&mut self, cov: Mat<f64>)
pub fn set_covariance(&mut self, cov: Mat<f64>)
Set the covariance matrix for this variable.
The covariance matrix should be square with dimension equal to the tangent space dimension of this variable.
§Arguments
cov- Covariance matrix in tangent space
Sourcepub fn clear_covariance(&mut self)
pub fn clear_covariance(&mut self)
Clear the covariance matrix for this variable.
Sourcepub fn get_bounds(&self) -> &HashMap<usize, (f64, f64)>
pub fn get_bounds(&self) -> &HashMap<usize, (f64, f64)>
Get the bounds for this variable.
Returns a reference to the bounds map where keys are indices and values are (lower, upper) pairs.
Sourcepub fn get_fixed_indices(&self) -> &HashSet<usize>
pub fn get_fixed_indices(&self) -> &HashSet<usize>
Get the fixed indices for this variable.
Returns a reference to the set of indices that should remain fixed during optimization.
Sourcepub fn set_from_vector(&mut self, vec: &DVector<f64>)
pub fn set_from_vector(&mut self, vec: &DVector<f64>)
Set the value of this variable from a vector representation.
This is used to update the variable after applying constraints (bounds and fixed indices).
Trait Implementations§
Source§impl Clone for VariableEnum
impl Clone for VariableEnum
Source§fn clone(&self) -> VariableEnum
fn clone(&self) -> VariableEnum
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for VariableEnum
impl RefUnwindSafe for VariableEnum
impl Send for VariableEnum
impl Sync for VariableEnum
impl Unpin for VariableEnum
impl UnwindSafe for VariableEnum
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.