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

Column of a matrix.

This struct points to a MatrixSlice making up a column in a matrix. You can deref this struct to retrieve the raw column MatrixSlice.

Example

use rulinalg::matrix::BaseMatrix;

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

let col = mat.col(1);
assert_eq!((*col + 2.0).sum(), 10.0);

Implementations

Clones the elements of this column into a slice of compatible size.

Panics
  • The slice does not have the same length as the number of rows in the column.

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
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Converts to this type from the input type.
The returned type after indexing.
Performs the 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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.