00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef MTL_STRIDED_DENSE_EL_CURSOR_INCLUDE
00013 #define MTL_STRIDED_DENSE_EL_CURSOR_INCLUDE
00014
00015 #include <boost/numeric/mtl/mtl_fwd.hpp>
00016 #include <boost/numeric/mtl/detail/strided_base_cursor.hpp>
00017
00018 namespace mtl {
00019
00021 template <typename Value>
00022 struct strided_dense_el_cursor : public detail::strided_base_cursor<const Value*>
00023 {
00024 typedef Value value_type;
00025 typedef const value_type* const_pointer_type;
00026 typedef detail::strided_base_cursor<const Value*> super;
00027 typedef strided_dense_el_cursor self;
00028
00029
00030 strided_dense_el_cursor (const_pointer_type me, size_t stride) : super(me, stride) {}
00031
00032 template <typename Parameters>
00033 strided_dense_el_cursor(dense2D<Value, Parameters> const& ma, size_t r, size_t c, size_t stride)
00034 : super(ma.elements() + ma.indexer(ma, r, c), stride)
00035 {}
00036
00037
00038 strided_dense_el_cursor(super const& x) : super(x) {}
00039
00040 self operator+(int x) const
00041 {
00042 return super::operator+(x);
00043 }
00044 };
00045
00046 }
00047
00048 #endif // MTL_STRIDED_DENSE_EL_CURSOR_INCLUDE