#include <sparse_array.h>

Public Types | |
| typedef std::map< I, T > | container_type |
| typedef container_type::size_type | size_type |
Public Member Functions | |
| T | operator[] (size_type index) const |
| Index into the map for a value. | |
| T & | operator[] (size_type index) |
| Index into the vector for a value. | |
| sparse_array & | operator+= (sparse_array const &rhs) |
| vectorized += operator | |
| sparse_array & | operator-= (sparse_array const &rhs) |
| vectorized -= operator, overflow shouldn't occur during substraction (iow: for each components lhs[i] >= rhs[i] | |
| size_type | size () const |
| return the maximum index of the array + 1 or 0 if the array is empty. | |
| bool | zero () const |
| return true if all elements have the default constructed value | |
| typedef std::map<I, T> sparse_array< I, T >::container_type |
| typedef container_type::size_type sparse_array< I, T >::size_type |
| sparse_array& sparse_array< I, T >::operator+= | ( | sparse_array< I, T > const & | rhs | ) | [inline] |
vectorized += operator
| sparse_array& sparse_array< I, T >::operator-= | ( | sparse_array< I, T > const & | rhs | ) | [inline] |
vectorized -= operator, overflow shouldn't occur during substraction (iow: for each components lhs[i] >= rhs[i]
| T& sparse_array< I, T >::operator[] | ( | size_type | index | ) | [inline] |
Index into the vector for a value.
If the index is larger than the current max index, a new array entry is created.
| T sparse_array< I, T >::operator[] | ( | size_type | index | ) | const [inline] |
Index into the map for a value.
NOTE: since std::map does/can not have a const member function for operator[], this const member function simply returns 0 for profile classes that aren't represented in the map. This member function will only be invoked for queries of the sparse array.
| size_type sparse_array< I, T >::size | ( | ) | const [inline] |
return the maximum index of the array + 1 or 0 if the array is empty.
| bool sparse_array< I, T >::zero | ( | ) | const [inline] |
return true if all elements have the default constructed value
1.6.1