/// Create new matrix with an initial value.
///
/// # Panics
///
/// This function panics if the number of rows is greater than 0
/// and the number of columns is 0. If you need to build a matrix
/// column by column, build it row by row and call transposition
/// or rotation functions on it.
Create new matrix with an initial value.
Create new matrix with an initial value .
pub fn new(rows: usize, columns: usize, value: C) -> Self {
        assert!(
            rows == 0 || columns > 0,
            "unable to create a matrix with empty rows"
        );
        Self {
            rows,
            columns,
            data: vec![value; rows * columns],
        }
    }
pub fn new ( rows : usize , columns : usize , value : C ) -> Self { assert ! ( rows 0 columns 0 " " ) ; Self { rows , columns , data : vec ! [ value rows columns ] , } }
Create new matrix with an initial value.
Create new matrix with an initial value .
rows
usize
columns
usize
value
C
panics
This function panics if the number of rows is greater than 0
and the number of columns is 0. If you need to build a matrix
column by column, build it row by row and call transposition
or rotation functions on it.
This function panics if the number of rows is greater than 0 and the number of columns is 0 . If you need to build a matrix column by column build it row by row and call transposition or rotation functions on it .