00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef MTL_ELEMENT_MATRIX_INCLUDE
00013 #define MTL_ELEMENT_MATRIX_INCLUDE
00014
00015 namespace mtl { namespace matrix {
00016
00017
00018 template <typename Matrix, typename Rows, typename Cols>
00019 struct element_matrix_t
00020 {
00021 explicit element_matrix_t(const Matrix& matrix, const Rows& rows, const Cols& cols)
00022 : matrix(matrix), rows(rows), cols(cols)
00023 {}
00024
00025 const Matrix& matrix;
00026 const Rows& rows;
00027 const Cols& cols;
00028 };
00029
00030
00031 template <typename Matrix, typename Rows, typename Cols>
00032 element_matrix_t<Matrix, Rows, Cols>
00033 inline element_matrix(const Matrix& matrix, const Rows& rows, const Cols& cols)
00034 {
00035 return element_matrix_t<Matrix, Rows, Cols>(matrix, rows, cols);
00036 }
00037
00038 template <typename Matrix, typename Rows>
00039 element_matrix_t<Matrix, Rows, Rows>
00040 inline element_matrix(const Matrix& matrix, const Rows& rows)
00041 {
00042 return element_matrix_t<Matrix, Rows, Rows>(matrix, rows, rows);
00043 }
00044
00045
00046 }}
00047
00048 #endif // MTL_ELEMENT_MATRIX_INCLUDE