Scythe-1.0.3
|
template<typename T_type = double, matrix_order ORDER = Col, matrix_style STYLE = Concrete>
Returns a view of a submatrix. This operator returns a rectangular submatrix view of this Matrix with its upper left corner at (x1, y1) and its lower right corner at (x2, y2).
Example: #include <iostream> #include <scythestat/matrix.h> using namespace scythe; int main () { /* Print a big X to the terminal */ Matrix<char> A(6, 6, true, ' '); A(0, 0, 1, 1) = A(2, 2, 3, 3) = A(0, 4, 1, 5) = A(4, 0, 5, 1) = A(4, 4, 5, 5) = '*'; std::cout << A << "\n"; return 0; } |