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() [1/3]

SparseVectorIterator ( const SparseVectorIterator source)
inline

copy constructor

◆ ~SparseVectorIterator()

virtual ~SparseVectorIterator ( )
inlinevirtual

destructor

◆ SparseVectorIterator() [2/3]

SparseVectorIterator ( SparseVector vector,
size_type  position 
)
inlineprotected

◆ SparseVectorIterator() [3/3]

SparseVectorIterator ( )
private

Not implemented => private.

Member Function Documentation

◆ hop()

SparseVectorIterator& hop ( )
inline

go to the next nonempty position

◆ operator!=()

bool operator!= ( const SparseVectorIterator other)
inline

◆ operator*() [1/2]

ValueProxy operator* ( )
inline

dereference operator

References SparseVector< Value >::ValueProxy::ValueProxy().

◆ operator*() [2/2]

const Value operator* ( ) const
inline

const dereference operator

References SparseVector< Value >::ValueProxy::ValueProxy().

◆ operator+() [1/2]

SparseVectorIterator operator+ ( const size_type  rhs) const
inline

binary arithmetic +

◆ operator+() [2/2]

difference_type operator+ ( const SparseVectorIterator  rhs) const
inline

◆ operator++() [1/2]

SparseVectorIterator& operator++ ( )
inline

prefix increment

◆ operator++() [2/2]

SparseVectorIterator operator++ ( int  )
inline

postfix increment

◆ operator+=()

SparseVectorIterator& operator+= ( const size_type  rhs)
inline

compound assignment +

◆ operator-() [1/2]

SparseVectorIterator operator- ( const size_type  rhs) const
inline

binary arithmetic -

◆ operator-() [2/2]

difference_type operator- ( const SparseVectorIterator  rhs) const
inline

◆ operator--() [1/2]

SparseVectorIterator& operator-- ( )
inline

prefix decrement

◆ operator--() [2/2]

SparseVectorIterator operator-- ( int  )
inline

postfix decrement

◆ operator-=()

SparseVectorIterator& operator-= ( const size_type  rhs)
inline

compound assignment -

◆ operator<()

bool operator< ( const SparseVectorIterator other)
inline

◆ operator<=()

bool operator<= ( const SparseVectorIterator other)
inline

less or equal than operator

References SparseVector< Value >::SparseVectorIterator::position().

◆ operator=()

SparseVectorIterator& operator= ( const SparseVectorIterator source)
inline

◆ operator==()

bool operator== ( const SparseVectorIterator other)
inline

equality operator

◆ operator>()

bool operator> ( const SparseVectorIterator other)
inline

◆ operator>=()

bool operator>= ( const SparseVectorIterator other)
inline

greater or equal than operator

References SparseVector< Value >::SparseVectorIterator::position().

◆ operator[]()

ValueProxy operator[] ( size_type  n)
inline

◆ position()

size_type position ( ) const
inline

Friends And Related Function Documentation

◆ SparseVector< Value >

friend class SparseVector< Value >
friend

◆ SparseVectorConstIterator

friend class SparseVectorConstIterator
friend

Member Data Documentation

◆ position_

size_type position_
protected

◆ valit_

map_const_iterator valit_
protected

the position in the underlying map of SparseVector

Referenced by SparseVector< Value >::SparseVectorIterator::operator=().

◆ vector_

SparseVector& vector_
protected

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:12 using doxygen 1.8.13