macro_rules! mat {
($([$($elem:expr),* $(,)?]),* $(,)?) => { ... };
}Expand description
Macro to create a Matrix from a nested array.
ยงExample
use numberlab::mat;
use numberlab::structure::matrix::Matrix;
let matrix = mat![
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
];
assert_eq!(matrix, mat![[1, 2, 3], [4, 5, 6], [7, 8, 9]]);
assert_eq!(format!("{}", matrix), "\n 1 2 3\n 4 5 6\n 7 8 9\n");