[][src]Struct rulinalg::matrix::RowMut

pub struct RowMut<'a, T: 'a> { /* fields omitted */ }

Mutable row of a matrix.

This struct points to a mutable slice making up a row in a matrix. You can deref this struct to retrieve a MatrixSlice of the row.

Example

use rulinalg::matrix::BaseMatrixMut;

let mut mat = matrix![1.0, 2.0;
                      3.0, 4.0];

{
    let mut row = mat.row_mut(1);
    *row += 2.0;
}
let expected = matrix![1.0, 2.0;
                       5.0, 6.0];
assert_matrix_eq!(mat, expected);

Methods

impl<'a, T: 'a> RowMut<'a, T>[src]

pub fn raw_slice(&self) -> &'a [T][src]

Returns the row as a slice.

pub fn raw_slice_mut(&mut self) -> &'a mut [T][src]

Returns the row as a slice.

Methods from Deref<Target = MatrixSliceMut<'a, T>>

Trait Implementations

impl<'a, T> BaseMatrix<T> for RowMut<'a, T>[src]

impl<'a, T> BaseMatrixMut<T> for RowMut<'a, T>[src]

fn as_mut_ptr(&mut self) -> *mut T[src]

Top left index of the slice.

impl<'a, T: Clone> From<RowMut<'a, T>> for Vector<T>[src]

impl<'a, T: 'a> Deref for RowMut<'a, T>[src]

type Target = MatrixSliceMut<'a, T>

The resulting type after dereferencing.

impl<'a, T: 'a> DerefMut for RowMut<'a, T>[src]

impl<'a, T> Index<usize> for RowMut<'a, T>[src]

type Output = T

The returned type after indexing.

impl<'a, T> IndexMut<usize> for RowMut<'a, T>[src]

impl<'a, T: Debug + 'a> Debug for RowMut<'a, T>[src]

impl<'a, T: 'a + Copy> FromIterator<RowMut<'a, T>> for Matrix<T>[src]

Auto Trait Implementations

impl<'a, T> !Sync for RowMut<'a, T>

impl<'a, T> !Send for RowMut<'a, T>

impl<'a, T> Unpin for RowMut<'a, T>

impl<'a, T> !UnwindSafe for RowMut<'a, T>

impl<'a, T> RefUnwindSafe for RowMut<'a, T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]