Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
SparseVector< Value >::SparseVectorIterator Class Reference

random access iterator for SparseVector including the hop() function to jump to the next non-sparse element More...

#include <OpenMS/DATASTRUCTURES/SparseVector.h>

Public Member Functions

 SparseVectorIterator (const SparseVectorIterator &source)
 copy constructor More...
 
virtual ~SparseVectorIterator ()
 destructor More...
 
SparseVectorIteratoroperator= (const SparseVectorIterator &source)
 assignment operator More...
 
SparseVectorIteratoroperator++ ()
 prefix increment More...
 
SparseVectorIterator operator++ (int)
 postfix increment More...
 
SparseVectorIteratoroperator-- ()
 prefix decrement More...
 
SparseVectorIterator operator-- (int)
 postfix decrement More...
 
ValueProxy operator* ()
 dereference operator More...
 
const Value operator* () const
 const dereference operator More...
 
ValueProxy operator[] (size_type n)
 indexing More...
 
SparseVectorIteratoroperator+= (const size_type rhs)
 compound assignment + More...
 
SparseVectorIteratoroperator-= (const size_type rhs)
 compound assignment - More...
 
SparseVectorIterator operator+ (const size_type rhs) const
 binary arithmetic + More...
 
difference_type operator+ (const SparseVectorIterator rhs) const
 binary arithmetic + More...
 
SparseVectorIterator operator- (const size_type rhs) const
 binary arithmetic - More...
 
difference_type operator- (const SparseVectorIterator rhs) const
 binary arithmetic - More...
 
bool operator!= (const SparseVectorIterator &other)
 inequality operator More...
 
bool operator== (const SparseVectorIterator &other)
 equality operator More...
 
bool operator< (const SparseVectorIterator &other)
 less than operator More...
 
bool operator> (const SparseVectorIterator &other)
 greater than operator More...
 
bool operator<= (const SparseVectorIterator &other)
 less or equal than operator More...
 
bool operator>= (const SparseVectorIterator &other)
 greater or equal than operator More...
 
SparseVectorIteratorhop ()
 go to the next nonempty position More...
 
size_type position () const
 find out at what position the iterator is; useful in combination with hop() More...
 

Protected Member Functions

 SparseVectorIterator (SparseVector &vector, size_type position)
 

Protected Attributes

size_type position_
 the position in the referred SparseVector More...
 
SparseVectorvector_
 the referred SparseVector More...
 
map_const_iterator valit_
 the position in the underlying map of SparseVector More...
 

Private Member Functions

 SparseVectorIterator ()
 Not implemented => private. More...
 

Friends

class SparseVector< Value >
 
class SparseVectorConstIterator
 

Detailed Description

template<typename Value>
class OpenMS::SparseVector< Value >::SparseVectorIterator

random access iterator for SparseVector including the hop() function to jump to the next non-sparse element

Constructor & Destructor Documentation

SparseVectorIterator ( const SparseVectorIterator source)
inline

copy constructor

virtual ~SparseVectorIterator ( )
inlinevirtual

destructor

SparseVectorIterator ( SparseVector vector,
size_type  position 
)
inlineprotected
SparseVectorIterator ( )
private

Member Function Documentation

SparseVectorIterator& hop ( )
inline
bool operator!= ( const SparseVectorIterator other)
inline
ValueProxy operator* ( )
inline
const Value operator* ( ) const
inline
SparseVectorIterator operator+ ( const size_type  rhs) const
inline
difference_type operator+ ( const SparseVectorIterator  rhs) const
inline
SparseVectorIterator& operator++ ( )
inline
SparseVectorIterator operator++ ( int  )
inline
SparseVectorIterator& operator+= ( const size_type  rhs)
inline

compound assignment +

References SparseVector< Value >::SparseVectorIterator::position_.

SparseVectorIterator operator- ( const size_type  rhs) const
inline
difference_type operator- ( const SparseVectorIterator  rhs) const
inline
SparseVectorIterator& operator-- ( )
inline
SparseVectorIterator operator-- ( int  )
inline
SparseVectorIterator& operator-= ( const size_type  rhs)
inline

compound assignment -

References SparseVector< Value >::SparseVectorIterator::position_.

bool operator< ( const SparseVectorIterator other)
inline
bool operator<= ( const SparseVectorIterator other)
inline
SparseVectorIterator& operator= ( const SparseVectorIterator source)
inline
bool operator== ( const SparseVectorIterator other)
inline

equality operator

bool operator> ( const SparseVectorIterator other)
inline
bool operator>= ( const SparseVectorIterator other)
inline
ValueProxy operator[] ( size_type  n)
inline
size_type position ( ) const
inline

Friends And Related Function Documentation

friend class SparseVector< Value >
friend
friend class SparseVectorConstIterator
friend

Member Data Documentation

size_type position_
protected
map_const_iterator valit_
protected
SparseVector& vector_
protected

OpenMS / TOPP release 2.0.0 Documentation generated on Wed Mar 30 2016 16:18:45 using doxygen 1.8.5