AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects Version of the Day
Classes
AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff > Class Template Reference

Templateded iterator for iterating through a set of COO Matix elements but viewing them in transpose. More...

#include <AbstractLinAlgPack_TransSparseCOOElementViewIter.hpp>

List of all members.

Classes

class  ElementView
 Type for the object that is returned for the transpose sparse element. More...

Public types.

typedef ElementView< T_Iter,
T_IterCat, T_Indice,T_ValRef,
T_Diff > 
element_view_type
 
typedef T_Iter encap_iter_type
 
typedef
TransSparseCOOElementViewIter
< T_Iter, T_IterCat,T_Indice,
T_ValRef, T_Diff > 
iterator_type
 
typedef T_IterCat iterator_category
 
typedef element_view_type value_type
 
typedef element_view_typereference_type
 
typedef element_view_typepointer_type
 
typedef T_Diff difference_type
 
typedef size_t distance_type
 

Constructors.

 TransSparseCOOElementViewIter (T_Iter itr)
 Construct with the iterator of COO elements to transpose.

Iterator control functions.

reference_type operator* () const
pointer_type operator-> () const
value_type operator[] (distance_type n) const
iterator_typeoperator++ ()
const iterator_type operator++ (int)
iterator_typeoperator-- ()
const iterator_type operator-- (int)
iterator_type operator+ (distance_type n)
const iterator_type operator+ (distance_type n) const
iterator_typeoperator+= (distance_type n)
iterator_type operator- (distance_type n)
const iterator_type operator- (distance_type n) const
iterator_typeoperator-= (distance_type n)
distance_type operator- (const iterator_type &itr) const

Comparison Operators.

bool operator< (const iterator_type &itr)
bool operator<= (const iterator_type &itr)
bool operator> (const iterator_type &itr)
bool operator>= (const iterator_type &itr)
bool operator== (const iterator_type &itr)
bool operator!= (const iterator_type &itr)

Detailed Description

template<class T_Iter, class T_IterCat, class T_Indice, class T_ValRef, class T_Diff>
class AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >

Templateded iterator for iterating through a set of COO Matix elements but viewing them in transpose.

The iterator type T_Iter must yield a type that conforms to the SparseCOOElementTemplateInterface specification. In particular it must support itr->value(), itr->row_i(), and itr->col_i().

Any category of iterator can be used with this class. The relavant iterator traits have to be added to the template list since MS VC++ 5.0 does not support partial template specialization and therefore std::iterator_traits<> does not exist.

There is a lot of code here but for an iterator object, only the underlying iterator is stored. Thus, because of inlining accessing a COO matrix through this transposed iterator is just as efficient as assessing it through its non-transposed iterator. This is important for efficiency reasons.

The default assignment operator and copy constructor are allowed.

The template arguments are:{itemize} T_Iter The type of the iterator that is used to yield COO sparse elements T_IterCat The category of iterator (forward, random access etc.) T_Indice The type returned by itr->indice() T_ValRef The type for the value returned by value(). For example, if T_Ele is a const type then T_ValRef should be a constant reference and if it is a non-const type it should be a non-const reference.

Definition at line 80 of file AbstractLinAlgPack_TransSparseCOOElementViewIter.hpp.


Member Typedef Documentation

template<class T_Iter , class T_IterCat , class T_Indice , class T_ValRef , class T_Diff >
typedef ElementView<T_Iter,T_IterCat,T_Indice ,T_ValRef,T_Diff> AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::element_view_type
template<class T_Iter , class T_IterCat , class T_Indice , class T_ValRef , class T_Diff >
typedef T_Iter AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::encap_iter_type
template<class T_Iter , class T_IterCat , class T_Indice , class T_ValRef , class T_Diff >
typedef TransSparseCOOElementViewIter<T_Iter,T_IterCat ,T_Indice,T_ValRef,T_Diff> AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::iterator_type
template<class T_Iter , class T_IterCat , class T_Indice , class T_ValRef , class T_Diff >
typedef T_IterCat AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::iterator_category
template<class T_Iter , class T_IterCat , class T_Indice , class T_ValRef , class T_Diff >
typedef element_view_type AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::value_type
template<class T_Iter , class T_IterCat , class T_Indice , class T_ValRef , class T_Diff >
typedef element_view_type& AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::reference_type
template<class T_Iter , class T_IterCat , class T_Indice , class T_ValRef , class T_Diff >
typedef element_view_type* AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::pointer_type
template<class T_Iter , class T_IterCat , class T_Indice , class T_ValRef , class T_Diff >
typedef T_Diff AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::difference_type
template<class T_Iter , class T_IterCat , class T_Indice , class T_ValRef , class T_Diff >
typedef size_t AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::distance_type

Constructor & Destructor Documentation

template<class T_Iter , class T_IterCat , class T_Indice , class T_ValRef , class T_Diff >
AbstractLinAlgPack::TransSparseCOOElementViewIter< T_Iter, T_IterCat, T_Indice, T_ValRef, T_Diff >::TransSparseCOOElementViewIter ( T_Iter  itr) [inline]

Construct with the iterator of COO elements to transpose.

Note that this constructor also allows an implicit conversion from the nontransposed iterator to the transposed iterator. This may not be desireable.

Definition at line 179 of file AbstractLinAlgPack_TransSparseCOOElementViewIter.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends