![]() |
Boost.uBlas 1.49
Linear Algebra in C++: matrices, vectors and numeric algorithms
|
00001 00018 #ifndef BOOST_NUMERIC_UBLAS_TRAITS_CONST_ITERATOR_TYPE_HPP 00019 #define BOOST_NUMERIC_UBLAS_TRAITS_CONST_ITERATOR_TYPE_HPP 00020 00021 00022 #include <boost/numeric/ublas/fwd.hpp> 00023 #include <boost/numeric/ublas/tags.hpp> 00024 #include <boost/numeric/ublas/traits.hpp> 00025 00026 00027 namespace boost { namespace numeric { namespace ublas { 00028 00029 namespace detail { 00030 00038 template <typename MatrixT, typename TagT, typename OrientationT> 00039 struct const_iterator_type_impl; 00040 00041 00044 template <typename MatrixT> 00045 struct const_iterator_type_impl<MatrixT,tag::major,row_major_tag> 00046 { 00047 typedef typename matrix_view_traits<MatrixT>::const_iterator1 type; 00048 }; 00049 00050 00053 template <typename MatrixT> 00054 struct const_iterator_type_impl<MatrixT,tag::major,column_major_tag> 00055 { 00056 typedef typename matrix_view_traits<MatrixT>::const_iterator2 type; 00057 }; 00058 00059 00062 template <typename MatrixT> 00063 struct const_iterator_type_impl<MatrixT,tag::minor,row_major_tag> 00064 { 00065 typedef typename matrix_view_traits<MatrixT>::const_iterator2 type; 00066 }; 00067 00068 00071 template <typename MatrixT> 00072 struct const_iterator_type_impl<MatrixT,tag::minor,column_major_tag> 00073 { 00074 typedef typename matrix_view_traits<MatrixT>::const_iterator1 type; 00075 }; 00076 00077 } // Namespace detail 00078 00079 00086 template <typename ContainerT, typename TagT=void> 00087 struct const_iterator_type; 00088 00089 00094 template <typename VectorT> 00095 struct const_iterator_type<VectorT, void> 00096 { 00097 typedef typename vector_view_traits<VectorT>::const_iterator type; 00098 }; 00099 00100 00106 template <typename MatrixT> 00107 struct const_iterator_type<MatrixT,tag::major> 00108 { 00109 typedef typename detail::const_iterator_type_impl<MatrixT,tag::minor,typename matrix_view_traits<MatrixT>::orientation_category>::type type; 00110 }; 00111 00112 00118 template <typename MatrixT> 00119 struct const_iterator_type<MatrixT,tag::minor> 00120 { 00121 typedef typename detail::const_iterator_type_impl<MatrixT,tag::minor,typename matrix_view_traits<MatrixT>::orientation_category>::type type; 00122 }; 00123 00124 }}} // Namespace boost::numeric::ublas 00125 00126 00127 #endif // BOOST_NUMERIC_UBLAS_TRAITS_CONST_ITERATOR_TYPE_HPP