DenseVectorMut

Trait DenseVectorMut 

Source
pub trait DenseVectorMut: DenseVector {
    // Required method
    fn index_mut(&mut self, idx: usize) -> &mut Self::Scalar;
}
Expand description

Trait for dense vectors that can be modified, useful for expressing algorithms which compute a resulting dense vector, such as solvers.

This trait is sealed, and cannot be implemented outside of the sprs crate.

Required Methods§

Source

fn index_mut(&mut self, idx: usize) -> &mut Self::Scalar

Random mutable access to an element in the vector.

§Panics

If the index is out of bounds

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, N, S> DenseVectorMut for &'a mut ArrayBase<S, Ix1>
where S: DataMut<Elem = N>, N: 'a + Zero + Clone,

Source§

fn index_mut(&mut self, idx: usize) -> &mut N

Source§

impl<'a, N: 'a + Zero + Clone> DenseVectorMut for &'a mut [N]

Source§

fn index_mut(&mut self, idx: usize) -> &mut N

Source§

impl<'a, N: 'a + Zero + Clone> DenseVectorMut for &'a mut Vec<N>

Source§

fn index_mut(&mut self, idx: usize) -> &mut N

Source§

impl<N, S> DenseVectorMut for ArrayBase<S, Ix1>
where S: DataMut<Elem = N>, N: Zero + Clone,

Source§

fn index_mut(&mut self, idx: usize) -> &mut N

Source§

impl<N: Zero + Clone> DenseVectorMut for [N]

Source§

fn index_mut(&mut self, idx: usize) -> &mut N

Source§

impl<N: Zero + Clone> DenseVectorMut for Vec<N>

Source§

fn index_mut(&mut self, idx: usize) -> &mut N

Implementors§