# Template Class sub_matrix

- Defined in File matrix.hpp

## Inheritance Relationships

### Base Type

- `public cif::matrix_expression< sub_matrix< M2 > >` (Template Class matrix_expression)

## Class Documentation

template<typename M2>
class sub_matrix : public cif::matrix_expression<sub_matrix<M2>>

  A sub-view on a matrix.

  Public Functions

  inline sub_matrix(const M2 &m, int i, int j)

    Constructor.

  inline std::size_t dim_m() const

    Return dimension m.

  inline std::size_t dim_n() const

    Return dimension n.

  inline auto operator()(std::size_t i, std::size_t j) const

    Access to the value of element [ i, j ]