Skip to main content

ManifoldVariable

Trait ManifoldVariable 

Source
pub trait ManifoldVariable:
    Send
    + Sync
    + 'static {
Show 15 methods // Required methods fn as_param_slice(&self) -> &[f64]; fn dof(&self) -> usize; fn apply_tangent_step(&mut self, step: &[f64]); fn set_fixed_indices(&mut self, indices: HashSet<usize>); fn get_fixed_indices(&self) -> &HashSet<usize>; fn set_bounds(&mut self, bounds: HashMap<usize, (f64, f64)>); fn get_bounds(&self) -> &HashMap<usize, (f64, f64)>; fn manifold_type_name(&self) -> &'static str; fn set_covariance(&mut self, cov: Mat<f64>); fn covariance(&self) -> Option<&Mat<f64>>; fn clear_covariance(&mut self); fn to_dvector(&self) -> DVector<f64>; fn as_any(&self) -> &dyn Any; fn as_any_mut(&mut self) -> &mut dyn Any; fn clone_box(&self) -> Box<dyn ManifoldVariable>;
}
Expand description

Object-safe trait covering all manifold variable types.

Replaces VariableEnum as the common type for HashMap<String, Box<dyn ManifoldVariable>>. One blanket impl covers all 8 manifold types; no per-manifold match arms needed.

§Hot-path contract

as_param_slice, dof, and apply_tangent_step must never heap-allocate.

Required Methods§

Source

fn as_param_slice(&self) -> &[f64]

Zero-copy borrow of the parameter storage backing this variable.

Source

fn dof(&self) -> usize

Tangent space dimension (degrees of freedom).

Source

fn apply_tangent_step(&mut self, step: &[f64])

Apply a tangent-space step in-place: x ← x ⊞ δx. Fixed indices are zeroed before the retraction.

Source

fn set_fixed_indices(&mut self, indices: HashSet<usize>)

Source

fn get_fixed_indices(&self) -> &HashSet<usize>

Source

fn set_bounds(&mut self, bounds: HashMap<usize, (f64, f64)>)

Source

fn get_bounds(&self) -> &HashMap<usize, (f64, f64)>

Source

fn manifold_type_name(&self) -> &'static str

Static name of the underlying manifold type (“SE3”, “SO3”, …).

Source

fn set_covariance(&mut self, cov: Mat<f64>)

Source

fn covariance(&self) -> Option<&Mat<f64>>

Source

fn clear_covariance(&mut self)

Source

fn to_dvector(&self) -> DVector<f64>

Source

fn as_any(&self) -> &dyn Any

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Source

fn clone_box(&self) -> Box<dyn ManifoldVariable>

Trait Implementations§

Source§

impl Clone for Box<dyn ManifoldVariable>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<M> ManifoldVariable for Variable<M>
where M: LieGroup + Clone + Send + Sync + 'static, M::TangentVector: Tangent<M> + Send + Sync + 'static,