macro_rules! matrix {
[] => { ... };
[[$elem:expr; $ncols:expr]; $nrows:expr] => { ... };
[[$($elem:expr),+ $(,)?]; $nrows:expr] => { ... };
[$($row:expr),+ $(,)?] => { ... };
}
Expand description
Creates a new Matrix<T>
from literal.
I witnessed His decree:
Let there be matrix!
Thus,
matrix!
was brought forth into existence.
ยงExamples
use matreex::{matrix, Matrix};
let foo: Matrix<i32> = matrix![];
let bar = matrix![[0; 3]; 2];
let baz = matrix![[0, 1, 2]; 2];
let qux = matrix![[0, 1, 2], [3, 4, 5]];