pub struct RowMut<'a, T: 'a> { /* private fields */ }
Expand description

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);

Implementations

Returns the row as a slice.

Returns the row as a slice.

Trait Implementations

Rows in the matrix.
Columns in the matrix.
Row stride in the matrix.
Top left index of the matrix.
Returns true if the matrix contais no elements
Returns a MatrixSlice over the whole matrix. Read more
Get a reference to an element in the matrix without bounds checking.
Get a reference to an element in the matrix. Read more
Returns the column of a matrix at the given index. None if the index is out of bounds. Read more
Returns the column of a matrix at the given index without doing a bounds check. Read more
Returns the row of a matrix at the given index. Read more
Returns the row of a matrix at the given index without doing unbounds checking Read more
Returns an iterator over the matrix data. Read more
Iterate over the columns of the matrix. Read more
Iterate over the rows of the matrix. Read more
Iterate over diagonal entries Read more
Compute the metric distance between two matrices. Read more
Extract the diagonal of the matrix Read more
Split the matrix at the specified axis returning two MatrixSlices. Read more
Produce a MatrixSlice from an existing matrix. Read more

Top left index of the slice.

Returns a MatrixSliceMut over the whole matrix. Read more
Get a mutable reference to an element in the matrix without bounds checks.
Get a mutable reference to an element in the matrix. Read more
Returns a mutable iterator over the matrix. Read more
Returns a mutable reference to the column of a matrix at the given index. None if the index is out of bounds. Read more
Returns a mutable reference to the column of a matrix at the given index without doing a bounds check. Read more
Returns a mutable reference to the row of a matrix at the given index. None if the index is out of bounds. Read more
Returns a mutable reference to the row of a matrix at the given index without doing a bounds check. Read more
Swaps two rows in a matrix. Read more
Swaps two columns in a matrix. Read more
Iterate over the mutable columns of the matrix. Read more
Iterate over the mutable rows of the matrix. Read more
Iterate over diagonal entries mutably Read more
Split the matrix at the specified axis returning two MatrixSliceMuts. Read more
Produce a MatrixSliceMut from an existing matrix. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Converts to this type from the input type.
Creates a value from an iterator. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.