// Fills int matrix 2x2 with 1 auto m0 = Matrix!(int, 2, 2)(1); // Fills int matrix 2x2 with [[1, 2], [3, 4]] auto m1 = Matrix!(int, 2, 2)(1, 2, 3, 4); // Same auto m2 = Matrix!(int, 2, 2)([[1, 2], [3, 4]]); // Same mat2 m3 = [1, 2, 3, 4]; // Same mat2 m4 = [[1, 2], [3, 4]]; // Also you can construct matrix by // assigning values directly mat!(2, 3) m5 = [[1, 2, 3], [4, 5, 6]];
Constructs Matrix from components. If no components present matrix will be filled with 0