Sparse 3d array allowing space efficient access. More...
#include <vbl_fwd.h>

Public Types | |
| typedef std::size_t | size_type |
| typedef Map::const_iterator | const_iterator |
| The type of iterators into the efficient storage. More... | |
| typedef vbl_triple< unsigned, unsigned, unsigned > | Index_type |
| The type of objects used to index the sparse array. More... | |
| typedef T | T_type |
| The type of values stored by the sparse array. More... | |
| typedef Map::value_type | sequence_value_type |
| The type of values of the controlled sequence. More... | |
Public Member Functions | |
| bool | put (unsigned i, unsigned j, unsigned k, const T &t) |
| Put a value into location (i,j,k). More... | |
| T & | operator() (unsigned i, unsigned j, unsigned k) |
| Return contents of location (i,j,k). More... | |
| const T & | operator() (unsigned i, unsigned j, unsigned k) const |
| Return contents of (i,j,k). Assertion failure if not yet filled. More... | |
| bool | fullp (unsigned i, unsigned j, unsigned k) const |
| Return true if location (i,j,k) has been filled. More... | |
| T * | get_addr (unsigned i, unsigned j, unsigned k) |
| Return the address of location (i,j,k). 0 if not yet filled. More... | |
| std::ostream & | print (std::ostream &) const |
| Print the Array to a stream in "(i,j,k): value" format. More... | |
| T & | operator() (vbl_triple< unsigned, unsigned, unsigned > i) |
| Return contents at (i). More... | |
| T const & | operator() (vbl_triple< unsigned, unsigned, unsigned > i) const |
| Return contents at (i). Asserts that (i) is non-empty. More... | |
| void | erase (vbl_triple< unsigned, unsigned, unsigned >) |
| Erase element at location (i). Assertion failure if not yet filled. More... | |
| bool | fullp (vbl_triple< unsigned, unsigned, unsigned >) const |
| Return true if location (i) has been filled. More... | |
| bool | put (vbl_triple< unsigned, unsigned, unsigned >, const T &) |
| Put a value into location (i). More... | |
| T * | get_addr (vbl_triple< unsigned, unsigned, unsigned >) |
| Return the address of location (i). 0 if not yet filled. More... | |
| void | clear () |
| Empty the sparse matrix. More... | |
| size_type | count_nonempty () const |
| Return number of locations that have been assigned a value using "put". More... | |
| const_iterator | begin () const |
| A bidirectional iterator pointing at the first non-empty element. More... | |
| const_iterator | end () const |
| A bidirectional iterator pointing just beyond last non-empty element. More... | |
Protected Types | |
| typedef std::map< vbl_triple< unsigned, unsigned, unsigned >, T, std::less< vbl_triple< unsigned, unsigned, unsigned > > > | Map |
| The type of the storage. More... | |
Protected Attributes | |
| Map | storage_ |
| This stores a compact list of the values. More... | |
Sparse 3d array allowing space efficient access.
You can use this as e.g. s(300,700,900) = T(2).
|
inherited |
The type of iterators into the efficient storage.
Definition at line 71 of file vbl_sparse_array_base.h.
|
inherited |
The type of objects used to index the sparse array.
Definition at line 77 of file vbl_sparse_array_base.h.
|
protectedinherited |
The type of the storage.
Definition at line 41 of file vbl_sparse_array_base.h.
|
inherited |
The type of values of the controlled sequence.
The value_type is a std::pair<Index_type, typename T_type>
Definition at line 84 of file vbl_sparse_array_base.h.
|
inherited |
Definition at line 47 of file vbl_sparse_array_base.h.
|
inherited |
The type of values stored by the sparse array.
Definition at line 80 of file vbl_sparse_array_base.h.
|
inlineinherited |
A bidirectional iterator pointing at the first non-empty element.
If the array is empty it points just beyond the end.
Definition at line 88 of file vbl_sparse_array_base.h.
|
inherited |
Empty the sparse matrix.
Definition at line 18 of file vbl_sparse_array_base.hxx.
|
inlineinherited |
Return number of locations that have been assigned a value using "put".
Definition at line 74 of file vbl_sparse_array_base.h.
|
inlineinherited |
A bidirectional iterator pointing just beyond last non-empty element.
Definition at line 91 of file vbl_sparse_array_base.h.
|
inherited |
Erase element at location (i). Assertion failure if not yet filled.
Definition at line 36 of file vbl_sparse_array_base.hxx.
|
inherited |
Return true if location (i) has been filled.
Definition at line 59 of file vbl_sparse_array_base.hxx.
|
inline |
Return true if location (i,j,k) has been filled.
Definition at line 64 of file vbl_sparse_array_3d.h.
|
inherited |
Return the address of location (i). 0 if not yet filled.
Return the memory address of location (i). 0 if not yet filled.
Definition at line 47 of file vbl_sparse_array_base.hxx.
|
inline |
Return the address of location (i,j,k). 0 if not yet filled.
Definition at line 72 of file vbl_sparse_array_3d.h.
|
inline |
Return contents of location (i,j,k).
Returns an undefined value (in fact a T()) if location (i,j,k) has not been filled with a value.
Definition at line 48 of file vbl_sparse_array_3d.h.
|
inlineinherited |
Return contents at (i).
Definition at line 50 of file vbl_sparse_array_base.h.
|
inherited |
Return contents at (i). Asserts that (i) is non-empty.
Return contents of (i). Assertion failure if not yet filled.
Definition at line 25 of file vbl_sparse_array_base.hxx.
|
inline |
Return contents of (i,j,k). Assertion failure if not yet filled.
Definition at line 56 of file vbl_sparse_array_3d.h.
| std::ostream & vbl_sparse_array_3d< T >::print | ( | std::ostream & | out | ) | const |
Print the Array to a stream in "(i,j,k): value" format.
Print the array to a stream in "(i,j,k): value" format.
Definition at line 17 of file vbl_sparse_array_3d.hxx.
|
inline |
Put a value into location (i,j,k).
Definition at line 38 of file vbl_sparse_array_3d.h.
|
inherited |
Put a value into location (i).
Definition at line 66 of file vbl_sparse_array_base.hxx.
|
protectedinherited |
This stores a compact list of the values.
Definition at line 43 of file vbl_sparse_array_base.h.
1.8.15