1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use crate::{
    matrix::Matrix,
    number::Number,
    types::{Square, Standard},
};

impl<U> Matrix<Standard, U>
where
    U: Number,
{
    pub fn zeros(rows: usize, columns: usize) -> Self {
        Self::new(rows, columns, vec![U::default(); rows * columns])
    }
}

impl<U> Matrix<Square, U>
where
    U: Number,
{
    pub fn zeros(dim: usize) -> Self {
        Self::new(dim, dim, vec![U::default(); dim * dim])
    }
}