![]() |
PeriDyno 1.0.0
|
An CPU/GPU implementation of the standard multimap suitable for small-size data. More...
#include <MultiMap.h>
Public Types | |
using | iterator = Pair<MKey, T>* |
Public Member Functions | |
DYN_FUNC | MultiMap () |
DYN_FUNC void | reserve (Pair< MKey, T > *buf, int maxSize) |
DYN_FUNC iterator | find (MKey key) |
DYN_FUNC iterator | begin () |
DYN_FUNC iterator | end () |
DYN_FUNC void | clear () |
DYN_FUNC uint | size () |
DYN_FUNC uint | count (MKey key) |
DYN_FUNC T & | operator[] (MKey key) |
DYN_FUNC const T & | operator[] (MKey key) const |
DYN_FUNC iterator | insert (Pair< MKey, T > pair) |
DYN_FUNC bool | empty () |
Private Attributes | |
uint | m_size = 0 |
Pair< MKey, T > * | m_startLoc = nullptr |
uint | m_maxSize = 0 |
An CPU/GPU implementation of the standard multimap suitable for small-size data.
Be aware do not use this structure if the data size is large, because the computation complexity is O(n^2) for some specific situation.
All elements are organized in non-descending order.
T |
Definition at line 20 of file MultiMap.h.
using dyno::MultiMap< MKey, T >::iterator = Pair<MKey, T>* |
Definition at line 23 of file MultiMap.h.
DYN_FUNC dyno::MultiMap< MKey, T >::MultiMap | ( | ) |
Definition at line 9 of file MultiMap.inl.
|
inline |
Definition at line 34 of file MultiMap.h.
DYN_FUNC void dyno::MultiMap< MKey, T >::clear | ( | ) |
Definition at line 70 of file MultiMap.inl.
DYN_FUNC uint dyno::MultiMap< MKey, T >::count | ( | MKey | key | ) |
DYN_FUNC bool dyno::MultiMap< MKey, T >::empty | ( | ) |
Definition at line 98 of file MultiMap.inl.
|
inline |
Definition at line 38 of file MultiMap.h.
DYN_FUNC Pair< MKey, T > * dyno::MultiMap< MKey, T >::find | ( | MKey | key | ) |
Definition at line 14 of file MultiMap.inl.
DYN_FUNC Pair< MKey, T > * dyno::MultiMap< MKey, T >::insert | ( | Pair< MKey, T > | pair | ) |
Definition at line 22 of file MultiMap.inl.
|
inline |
|
inline |
|
inline |
Definition at line 27 of file MultiMap.h.
DYN_FUNC uint dyno::MultiMap< MKey, T >::size | ( | ) |
Definition at line 76 of file MultiMap.inl.
|
private |
Definition at line 57 of file MultiMap.h.
|
private |
Definition at line 54 of file MultiMap.h.
|
private |
Definition at line 56 of file MultiMap.h.