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>
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 | |
| ValueProxy & | operator= (const ValueProxy &rhs) |
| assignment operator, ditches the sparse elements | |
| ValueProxy & | operator= (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 | |
| SparseVector & | vec_ |
| the referring SparseVector | |
| size_type | index_ |
| the reference into the SparseVector | |
class ValueProxy allows the SparseVector to differentiate between writing and reading, so zeros can be ignored See "more effective c++" section 30
| ValueProxy | ( | SparseVector & | vec, | |
| size_type | index | |||
| ) | [inline] |
public constructor
| operator double | ( | ) | const [inline] |
cast operator for implicit casting in case of reading in the vector
References SparseVector< Value >::ValueProxy::index_, SparseVector< Value >::sparse_element_, SparseVector< Value >::values_, and SparseVector< Value >::ValueProxy::vec_.
| operator float | ( | ) | const [inline] |
cast operator for implicit casting in case of reading in the vector
References SparseVector< Value >::ValueProxy::index_, SparseVector< Value >::sparse_element_, SparseVector< Value >::values_, and SparseVector< Value >::ValueProxy::vec_.
| operator int | ( | ) | const [inline] |
cast operator for implicit casting in case of reading in the vector
References SparseVector< Value >::ValueProxy::index_, SparseVector< Value >::sparse_element_, SparseVector< Value >::values_, and SparseVector< Value >::ValueProxy::vec_.
| bool operator!= | ( | const ValueProxy & | other | ) | [inline] |
inequality operator
References SparseVector< Value >::ValueProxy::index_, and SparseVector< Value >::ValueProxy::vec_.
| 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] |
assignment operator, ditches the sparse elements
References SparseVector< Value >::ValueProxy::index_, SparseVector< Value >::sparse_element_, SparseVector< Value >::values_, and SparseVector< Value >::ValueProxy::vec_.
| ValueProxy& operator= | ( | const ValueProxy & | rhs | ) | [inline] |
assignment operator, ditches the sparse elements
References SparseVector< Value >::ValueProxy::index_, SparseVector< Value >::values_, and SparseVector< Value >::ValueProxy::vec_.
| 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
the reference into the SparseVector
Referenced by SparseVector< Value >::ValueProxy::operator double(), SparseVector< Value >::ValueProxy::operator float(), SparseVector< Value >::ValueProxy::operator int(), SparseVector< Value >::ValueProxy::operator!=(), and SparseVector< Value >::ValueProxy::operator=().
SparseVector& vec_ [private] |
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:53 using doxygen 1.7.1 |