Scythe-1.0.3
template<typename T_type = double, matrix_order ORDER = Col, matrix_style STYLE = Concrete>
Matrix<T_type, ORDER, View> scythe::Matrix< T_type, ORDER, STYLE >::operator() ( uint  x1,
uint  y1,
uint  x2,
uint  y2 
) [inline]

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).

Parameters:
x1The upper row of the submatrix.
y1The leftmost column of the submatrix.
x2The lowest row of the submatrix.
y2The rightmost column of the submatrix.
See also:
operator()(uint, uint, uint, uint) const
operator()(all_elements, uint)
operator()(all_elements, uint) const
operator()(uint, all_elements)
operator()(uint, all_elements) const
Exceptions:
scythe_bounds_error(Level 2)

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;
}