6#ifndef submatrixiterator_hh
7#define submatrixiterator_hh
27 template <
class F,
class _Ref,
class _Ptr>
32 template<
class F_,
class _Ref_,
class _Ptr_>
35 typedef std::forward_iterator_tag iterator_category;
36 typedef typename F::type value_type;
38 typedef _Ref reference;
39 typedef size_t size_type;
44 typedef typename _Base::return_type return_type;
60 template<
class _RefR,
class _PtrR>
62 :
_Base(
__x), i_(0), iend_(0), iI_(0), lastI_(0), m_(
__x.m()) {
64 i_.reset(
new typename MatrixType<F, _Ref, _Ptr>::iterator(*
__x.i()));
67 (
new typename MatrixType<F, _Ref, _Ptr>::iterator(*
__x.iend()));
86 template<
class _RefR,
class _PtrR>
90 i_.reset(
new typename MatrixType<F, _Ref, _Ptr>::iterator(*
__x.i()));
94 (
new typename MatrixType<F, _Ref, _Ptr>::iterator(*
__x.iend()));
96 iI_ =
__x.iI(); lastI_ =
__x.lastI();
109 inline typename MatrixType<F, _Ref, _Ptr>::iterator* i()
const {
112 inline const typename MatrixType<F, _Ref, _Ptr>::iterator* iend()
const {
115 inline Set<IndexRange>::index_iterator* iI()
const {
return iI_.get(); }
116 const Set<IndexRange>::index_iterator* lastI()
const {
119 inline matrix_type* m()
const {
return m_; }
121 virtual std::ostream&
info(std::ostream&
os)
const;
124 std::shared_ptr<typename MatrixType<F, _Ref, _Ptr>::iterator> i_;
126 std::shared_ptr<const typename MatrixType<F, _Ref, _Ptr>::iterator> iend_;
128 std::shared_ptr<Set<IndexRange>::index_iterator> iI_;
130 std::shared_ptr<const Set<IndexRange>::index_iterator> lastI_;
141 template <
class F,
class _Ref,
class _Ptr>
142 template<
class F_,
class _Ref_,
class _Ptr_>
145 typedef typename F_::iterator iterator;
149 template <
class F,
class _Ref,
class _Ptr>
152 MatrixType<F_, const typename F::type&, const typename F::type*>
155 typedef typename F_::const_iterator iterator;
_Self & operator=(const iterator &__x)
Assignment.
_Self & operator++()
Increment operator.
pointer operator->() const
Returns a pointer to the value.
_Self & operator=(const _SubMatrix_iterator< F, _RefR, _PtrR > &__x)
Assignment.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
return_type operator*() const
Dereferencation.
_SubMatrix_iterator()
Constructor. Iterator stands at the end of any matrix.
_SubMatrix_iterator(matrix_type &m, uint r=0)
_SubMatrix_iterator(const _SubMatrix_iterator< F, _RefR, _PtrR > &__x)
Copy constructor. Also from iterator to constant iterator.
#define conceptsAssert(cond, exc)
F * securePointer(F &value, G *matrix)
Set< F > makeSet(uint n, const F &first,...)
Non-constant matrix for non-constant iterator.