Templated version of SparseVectorMap where the data and key are the same (actually more like a set than a map in this case).
More...
#include <sparseVectorMap.h>
|
typedef std::vector< keyT >::iterator | iterator |
|
typedef std::vector< keyT >::const_iterator | const_iterator |
|
|
class | SST::Core::Serialization::serialize< SparseVectorMap< keyT, keyT > > |
|
class | ConfigGraph |
|
template<typename keyT>
class SST::SparseVectorMap< keyT, keyT >
Templated version of SparseVectorMap where the data and key are the same (actually more like a set than a map in this case).
The type must implement the less than operator. This is primarily intended for use with native types.
◆ SparseVectorMap()
Constructor that allows you to pass an already filled in array with data.
The data in the passed in vector will be swapped into the data vector of the SparseVectorMap and the passed in vector will be empty.
- Parameters
-
new_data | Vector of data to swap into the SparseVectorMap data |
sorted | Specifies whether the vector is already sorted in ascending order. If not, it will be sorted after swapping the data in. |
◆ begin() [1/2]
Returns the begin iterator to the underlying vector.
- Returns
- begin iterator to data vector
◆ begin() [2/2]
Returns the const begin iterator to the underlying vector.
- Returns
- const begin iterator to data vector
◆ contains()
Checks if the provided id is found in the SparseVectorMap.
- Parameters
-
- Returns
- true if id is found, false otherwise
◆ end() [1/2]
Returns the end iterator to the underlying vector.
- Returns
- end iterator to data vector
◆ end() [2/2]
Returns the const end iterator to the underlying vector.
- Returns
- const end iterator to data vector
◆ insert()
Insert new value into SparseVectorMap.
The inserted class must have a key() function with return type keyT.
- Parameters
-
- Returns
- reference to the inserted item, or to the existing item if it was already present in the map.
◆ operator[]() [1/2]
Operator returns a reference to data with the specified id.
Value can be modified. This will only return references to existing values, you must use insert() for new values.
- Parameters
-
id | id of the value to return (value returned by key()) |
- Returns
- reference to the requested item.
◆ operator[]() [2/2]
Operator returns a const reference to data with the specified id.
Value cannot be modified. This will only return references to existing values, you must use insert() for new values.
- Parameters
-
id | id of the value to return (value returned by key()) |
- Returns
- const reference to the requested item.
◆ size()
The documentation for this class was generated from the following file: