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