Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Private Attributes

SparseVector< Value >::ValueProxy Class Reference

class ValueProxy allows the SparseVector to differentiate between writing and reading, so zeros can be ignored See "more effective c++" section 30 More...

#include <OpenMS/DATASTRUCTURES/SparseVector.h>

List of all members.

Public Member Functions

 ValueProxy (SparseVector &vec, size_type index)
 public constructor
 operator double () const
 cast operator for implicit casting in case of reading in the vector
 operator int () const
 cast operator for implicit casting in case of reading in the vector
 operator float () const
 cast operator for implicit casting in case of reading in the vector
ValueProxyoperator= (const ValueProxy &rhs)
 assignment operator, ditches the sparse elements
ValueProxyoperator= (Value val)
 assignment operator, ditches the sparse elements
bool operator!= (const ValueProxy &other)
 inequality operator
bool operator== (const ValueProxy &other)
 equality operator
bool operator< (const ValueProxy &other)
 less than operator
bool operator> (const ValueProxy &other)
 greater than operator
bool operator<= (const ValueProxy &other)
 less or equal than operator
bool operator>= (const ValueProxy &other)
 greater or equal than operator

Private Attributes

SparseVectorvec_
 the referring SparseVector
size_type index_
 the reference into the SparseVector

Detailed Description

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

class ValueProxy allows the SparseVector to differentiate between writing and reading, so zeros can be ignored See "more effective c++" section 30


Constructor & Destructor Documentation

ValueProxy ( SparseVector vec,
size_type  index 
) [inline]

public constructor


Member Function Documentation

operator double (  )  const [inline]
operator float (  )  const [inline]
operator int (  )  const [inline]
bool operator!= ( const ValueProxy other  )  [inline]
bool operator< ( const ValueProxy other  )  [inline]

less than operator

bool operator<= ( const ValueProxy other  )  [inline]

less or equal than operator

ValueProxy& operator= ( Value  val  )  [inline]
ValueProxy& operator= ( const ValueProxy rhs  )  [inline]
bool operator== ( const ValueProxy other  )  [inline]

equality operator

bool operator> ( const ValueProxy other  )  [inline]

greater than operator

bool operator>= ( const ValueProxy other  )  [inline]

greater or equal than operator


Member Data Documentation

size_type index_ [private]
SparseVector& vec_ [private]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:53 using doxygen 1.7.1