pub fn diagonal(columns: u32, default: T) -> Self
    where
        T: Default + Clone,
    {
        let mut res = Self::new_default([columns, columns]);
        let columns = columns as usize;
        for i in 0..columns {
            res.values[i * columns + i] = default.clone()
        }
        res
    }
/// Returns a Diagonal matrix where the values are the given default value and the rest of the
/// items are Default'ed
Returns a Diagonal matrix where the values are the given default value and the rest of the
items are Default'ed
Returns a Diagonal matrix where the values are the given default value and the rest of the items are Default ' ed
pub fn diagonal(columns: u32, default: T) -> Self
    where
        T: Default + Clone,
    {
        let mut res = Self::new_default([columns, columns]);
        let columns = columns as usize;
        for i in 0..columns {
            res.values[i * columns + i] = default.clone()
        }
        res
    }
pub fn diagonal ( columns : u32 , default : T ) -> Self where T : Default + Clone , { let mut res = Self :: new_default ( [ columns , columns ] ) ; let columns = columns as usize ; for i in 0 .. columns { res . values [ i * columns + i ] = default . clone ( ) } res }
Returns a Diagonal matrix where the values are the given default value and the rest of the
items are Default'ed
Returns a Diagonal matrix where the values are the given default value and the rest of the items are Default ' ed
columns
u32
default
T