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§
Sourcefn as_param_slice(&self) -> &[f64]
fn as_param_slice(&self) -> &[f64]
Zero-copy borrow of the parameter storage backing this variable.
Sourcefn apply_tangent_step(&mut self, step: &[f64])
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.
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)>
Sourcefn manifold_type_name(&self) -> &'static str
fn manifold_type_name(&self) -> &'static str
Static name of the underlying manifold type (“SE3”, “SO3”, …).
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>
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".