42 #ifndef TRANS_SPARSE_COO_ELEMENT_VIEW_ITER_H
43 #define TRANS_SPARSE_COO_ELEMENT_VIEW_ITER_H
47 #include "AbstractLinAlgPack_Types.hpp"
49 namespace AbstractLinAlgPack {
79 template <
class T_Iter,
class T_IterCat,
class T_Indice,
class T_ValRef,
class T_Diff>
94 template <
class TT_Iter,
class TT_IterCat,
class TT_Indice,
class TT_ValRef,
class TT_Diff>
112 ElementView(
const TT_Iter& iter) : encap_iter_(iter)
119 return encap_iter_->value();
124 return encap_iter_->col_j();
129 return encap_iter_->row_i();
200 element_view_.encap_iter_++;
211 element_view_.encap_iter_--;
229 element_view_.encap_iter_ += n;
241 element_view_.encap_iter_ -= n;
246 return element_view_.encap_iter_ - itr.element_view_.encap_iter_;
258 return element_view_.encap_iter_ < itr.element_view_.encap_iter_;
263 return element_view_.encap_iter_ <= itr.element_view_.encap_iter_;
268 return element_view_.encap_iter_ > itr.element_view_.encap_iter_;
273 return element_view_.encap_iter_ >= itr.element_view_.encap_iter_;
278 return element_view_.encap_iter_ == itr.element_view_.encap_iter_;
283 return element_view_.encap_iter_ != itr.element_view_.encap_iter_;
308 template <
class Iter,
class Cat,
class Indice,
class ValRef,
class Diff>
309 inline TransSparseCOOElementViewIter<Iter,Cat,Indice,ValRef,Diff>
310 operator+(Diff n,
const TransSparseCOOElementViewIter<Iter,Cat,Indice,ValRef,Diff> itr)
317 #endif // TRANS_SPARSE_COO_ELEMENT_VIEW_ITER_H
TransSparseCOOElementViewIter(T_Iter itr)
Construct with the iterator of COO elements to transpose.
TransSparseCOOElementViewIter< T_Iter, T_IterCat,T_Indice, T_ValRef, T_Diff > iterator_type
indice_type row_i() const
returns col_j() of the underlying COO element
ElementView< T_Iter, T_IterCat, T_Indice,T_ValRef, T_Diff > element_view_type
Templateded iterator for iterating through a set of COO Matix elements but viewing them in transpose...
value_ref_type value() const
element_view_type * pointer_type
Type for the object that is returned for the transpose sparse element.
element_view_type value_type
indice_type col_j() const
returns row_i() of the underlying COO element
T_IterCat iterator_category
element_view_type & reference_type