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>
|
using | iterator = typename std::vector<keyT>::iterator |
|
using | const_iterator = typename std::vector<keyT>::const_iterator |
|
using | iterator |
|
using | const_iterator |
|
|
| SparseVectorMap () |
| Default constructor for SparseVectorMap.
|
|
| SparseVectorMap (std::vector< keyT > &new_data, bool sorted=false) |
| Constructor that allows you to pass an already filled in array with data.
|
|
keyT & | insert (const keyT &val) |
| Insert new value into SparseVectorMap.
|
|
iterator | begin () |
| Returns the begin iterator to the underlying vector.
|
|
iterator | end () |
| Returns the end iterator to the underlying vector.
|
|
const_iterator | begin () const |
| Returns the const begin iterator to the underlying vector.
|
|
const_iterator | end () const |
| Returns the const end iterator to the underlying vector.
|
|
bool | contains (keyT id) |
| Checks if the provided id is found in the SparseVectorMap.
|
|
keyT & | operator[] (keyT id) |
| Operator returns a reference to data with the specified id.
|
|
const keyT & | operator[] (keyT id) const |
| Operator returns a const reference to data with the specified id.
|
|
void | clear () |
| Clears the contents of the SparseVectorMap.
|
|
size_t | size () |
| Returns the number of items in the SparseVectorMap.
|
|
| SparseVectorMap () |
| Default constructor for SparseVectorMap.
|
|
| SparseVectorMap (std::vector< keyT > &new_data, bool sorted=false) |
| Constructor that allows you to pass an already filled in array with data.
|
|
keyT & | insert (const keyT &val) |
| Insert new value into SparseVectorMap.
|
|
iterator | begin () |
| Returns the begin iterator to the underlying vector.
|
|
const_iterator | begin () const |
| Returns the const begin iterator to the underlying vector.
|
|
iterator | end () |
| Returns the end iterator to the underlying vector.
|
|
const_iterator | end () const |
| Returns the const end iterator to the underlying vector.
|
|
bool | contains (keyT id) const |
| Checks if the provided id is found in the SparseVectorMap.
|
|
keyT & | operator[] (keyT id) |
| Operator returns a reference to data with the specified id.
|
|
const keyT & | operator[] (keyT id) const |
| Operator returns a const reference to data with the specified id.
|
|
void | clear () |
| Clears the contents of the SparseVectorMap.
|
|
size_t | size () |
| Returns the number of items in the SparseVectorMap.
|
|
|
class | SST::Core::Serialization::serialize_impl< SparseVectorMap< keyT, keyT > > |
|
class | ConfigGraph |
|
class | SST::Core::Serialization::serialize_impl< SparseVectorMap< keyT, classT > > |
|
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() [1/2]
template<typename keyT>
SST::SparseVectorMap< keyT, keyT >::SparseVectorMap |
( |
std::vector< keyT > & | new_data, |
|
|
bool | sorted = false ) |
|
inline |
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. |
◆ SparseVectorMap() [2/2]
SST::SparseVectorMap< keyT, keyT >::SparseVectorMap |
( |
std::vector< keyT > & | new_data, |
|
|
bool | sorted = false ) |
|
inline |
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/4]
Returns the begin iterator to the underlying vector.
- Returns
- begin iterator to data vector
◆ begin() [2/4]
Returns the begin iterator to the underlying vector.
- Returns
- begin iterator to data vector
◆ begin() [3/4]
Returns the const begin iterator to the underlying vector.
- Returns
- const begin iterator to data vector
◆ begin() [4/4]
Returns the const begin iterator to the underlying vector.
- Returns
- const begin iterator to data vector
◆ contains() [1/2]
Checks if the provided id is found in the SparseVectorMap.
- Parameters
-
- Returns
- true if id is found, false otherwise
◆ contains() [2/2]
Checks if the provided id is found in the SparseVectorMap.
- Parameters
-
- Returns
- true if id is found, false otherwise
◆ end() [1/4]
Returns the end iterator to the underlying vector.
- Returns
- end iterator to data vector
◆ end() [2/4]
Returns the end iterator to the underlying vector.
- Returns
- end iterator to data vector
◆ end() [3/4]
Returns the const end iterator to the underlying vector.
- Returns
- const end iterator to data vector
◆ end() [4/4]
Returns the const end iterator to the underlying vector.
- Returns
- const end iterator to data vector
◆ insert() [1/2]
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.
◆ insert() [2/2]
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/4]
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/4]
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[]() [3/4]
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.
◆ operator[]() [4/4]
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() [1/2]
◆ size() [2/2]
The documentation for this class was generated from the following file: