public static Matrix <T> Filled(int rows, int cols, T data) { GoodRange(rows, cols); T[] arr = new T[rows * cols]; for (int i = 0; i < rows * cols; ++i) { arr[i] = data; } var container = new MatrixContainer <T>(rows, cols, arr); return(new Matrix <T>(container)); }
internal Matrix(MatrixContainer <T> container) { this.container = container; }
internal Matrix(int rows, int columns) { container = new MatrixContainer <T>(rows, columns); }