iof/mat.rs
1/// A matrix with `m` rows and `n` columns.
2///
3/// # Examples
4///
5/// Create a matrix with two rows and three columns:
6///
7/// ```rust
8/// use iof::Mat;
9/// let mat = Mat::from(vec![vec![1, 2, 3], vec![4, 5, 6]]);
10/// assert_eq!(mat[0], [1, 2, 3]);
11/// assert_eq!(mat[1], [4, 5, 6]);
12/// ```
13///
14/// Read a matrix with two rows and three columns:
15///
16/// ```rust,no_run
17/// use iof::{read, Mat};
18/// let _: Mat<i32> = read!(2, 3);
19/// ```
20pub type Mat<T> = Vec<Vec<T>>;