PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::MultiMap< MKey, T > Class Template Reference

An CPU/GPU implementation of the standard multimap suitable for small-size data. More...

#include <MultiMap.h>

Collaboration diagram for dyno::MultiMap< MKey, T >:

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 Toperator[] (MKey key)
 
DYN_FUNC const Toperator[] (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
 

Detailed Description

template<typename MKey, typename T>
class dyno::MultiMap< MKey, T >

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.

Template Parameters
T

Definition at line 20 of file MultiMap.h.

Member Typedef Documentation

◆ iterator

template<typename MKey, typename T>
using dyno::MultiMap< MKey, T >::iterator = Pair<MKey, T>*

Definition at line 23 of file MultiMap.h.

Constructor & Destructor Documentation

◆ MultiMap()

template<typename MKey, typename T>
DYN_FUNC dyno::MultiMap< MKey, T >::MultiMap ( )

Definition at line 9 of file MultiMap.inl.

Member Function Documentation

◆ begin()

template<typename MKey, typename T>
DYN_FUNC iterator dyno::MultiMap< MKey, T >::begin ( )
inline

Definition at line 34 of file MultiMap.h.

◆ clear()

template<typename MKey, typename T>
DYN_FUNC void dyno::MultiMap< MKey, T >::clear ( )

Definition at line 70 of file MultiMap.inl.

◆ count()

template<typename MKey, typename T>
DYN_FUNC uint dyno::MultiMap< MKey, T >::count ( MKey key)

Definition at line 82 of file MultiMap.inl.

Here is the call graph for this function:

◆ empty()

template<typename MKey, typename T>
DYN_FUNC bool dyno::MultiMap< MKey, T >::empty ( )

Definition at line 98 of file MultiMap.inl.

◆ end()

template<typename MKey, typename T>
DYN_FUNC iterator dyno::MultiMap< MKey, T >::end ( )
inline

Definition at line 38 of file MultiMap.h.

◆ find()

template<typename MKey, typename T>
DYN_FUNC Pair< MKey, T > * dyno::MultiMap< MKey, T >::find ( MKey key)

Definition at line 14 of file MultiMap.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insert()

template<typename MKey, typename T>
DYN_FUNC Pair< MKey, T > * dyno::MultiMap< MKey, T >::insert ( Pair< MKey, T > pair)

Definition at line 22 of file MultiMap.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator[]() [1/2]

template<typename MKey, typename T>
DYN_FUNC T & dyno::MultiMap< MKey, T >::operator[] ( MKey key)
inline

Definition at line 46 of file MultiMap.inl.

Here is the call graph for this function:

◆ operator[]() [2/2]

template<typename MKey, typename T>
DYN_FUNC const T & dyno::MultiMap< MKey, T >::operator[] ( MKey key) const
inline

Definition at line 58 of file MultiMap.inl.

Here is the call graph for this function:

◆ reserve()

template<typename MKey, typename T>
DYN_FUNC void dyno::MultiMap< MKey, T >::reserve ( Pair< MKey, T > * buf,
int maxSize )
inline

Definition at line 27 of file MultiMap.h.

◆ size()

template<typename MKey, typename T>
DYN_FUNC uint dyno::MultiMap< MKey, T >::size ( )

Definition at line 76 of file MultiMap.inl.

Member Data Documentation

◆ m_maxSize

template<typename MKey, typename T>
uint dyno::MultiMap< MKey, T >::m_maxSize = 0
private

Definition at line 57 of file MultiMap.h.

◆ m_size

template<typename MKey, typename T>
uint dyno::MultiMap< MKey, T >::m_size = 0
private

Definition at line 54 of file MultiMap.h.

◆ m_startLoc

template<typename MKey, typename T>
Pair<MKey, T>* dyno::MultiMap< MKey, T >::m_startLoc = nullptr
private

Definition at line 56 of file MultiMap.h.


The documentation for this class was generated from the following files: