#include <Sparsevec.hh>
Public Methods | |
| Sparsevec_ () | |
| Ctor: inits to empty. | |
| const T_& | get_item (size_t Idx) const |
| get_item(Idx): returns a const ref to the Idx-th item. | |
| bool | set_item (size_t Idx, const T_ &Val) |
| set_item(Idx, Val): stores Val at the Idx-th position. More... | |
| void | clear () |
| Resets the calling object. | |
| bool | empty () const |
| Returns true after a clear() operation :-). | |
Protected Methods | |
| const map<size_t, T_>& | data () const |
Private Attributes | |
| map<size_t, T_> | Data |
Static Private Attributes | |
| const T_ | NULLITEM |
Only item access and emptiness test is provided. The data type T_ must support the comparison operators <, == and must have a "null item" T_(0). Only non-null items are stored.
Definition at line 37 of file Sparsevec.hh.
|
||||
|
Ctor: inits to empty.
Definition at line 49 of file Sparsevec.hh. |
|
||||
|
get_item(Idx): returns a const ref to the Idx-th item.
|
|
||||||
|
set_item(Idx, Val): stores Val at the Idx-th position. Return value: true if Idx was present, false if created anew. |
|
||||
|
Resets the calling object.
Definition at line 61 of file Sparsevec.hh. |
|
||||
|
Returns true after a clear() operation :-).
Definition at line 64 of file Sparsevec.hh. |
|
||||
|
Definition at line 68 of file Sparsevec.hh. |
|
|||
|
Definition at line 42 of file Sparsevec.hh. |
|
|||
|
Definition at line 43 of file Sparsevec.hh. |
1.2.6 written by Dimitri van Heesch,
© 1997-2001