Trait rustml::matrix::IntoMatrix [] [src]

pub trait IntoMatrix<T> {
    fn to_matrix(&self, rows: usize) -> Matrix<T>;
}

Trait to convert a data type into a matrix.

Required Methods

fn to_matrix(&self, rows: usize) -> Matrix<T>

Converts a data type into a matrix.

The number of rows is specified by the parameter rows.

Panics if the number of elements from which the matrix is created is not divisible by rows.

Implementors