pub struct Matrix {
    mat: Vec<Vec<f32>>,
    rows: usize,
    cols: usize,
}

pub fn newZeroMatrix(m: usize, n: usize) -> Matrix {
    let mut row = Vec::new();
    row.push(0.0);
    row = row.repeat(n);
    let mut cols = Vec::new();
    cols.push(row.clone());
    Matrix {
        mat: cols,
        rows: m,
        cols: n,
    }
}

pub fn transpose(m: &Matrix) -> Matrix {
    let mut newMat = newZeroMatrix(m.rows, m.cols);
    for i in 0..m.rows {
        for j in 0..m.cols {
            newMat.mat[i][j] = m.mat[j][i];
        }
    }
    newMat
}
