openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Classes | Public Member Functions | List of all members
hashmap::unordered_map< K, T, OPS > Class Template Reference

#include <hashmap.hpp>

Inheritance diagram for hashmap::unordered_map< K, T, OPS >:
Collaboration diagram for hashmap::unordered_map< K, T, OPS >:

Classes

class  const_iterator
 Const iterator. More...
 
class  iterator
 Default iterator. More...
 

Public Member Functions

 unordered_map ()
 Empty constructor. More...
 
 unordered_map (const unordered_map &other)
 Construct from another map. More...
 
 unordered_map (unordered_map &&other)
 Construct map form another map. More...
 
unordered_mapoperator= (const unordered_map &other)
 
unordered_mapoperator= (unordered_map &&other)
 
 unordered_map (const std::initializer_list< std::pair< K, T >> &list)
 
template<class InputIterator >
 unordered_map (InputIterator first, InputIterator last)
 Construct from Iterator range. More...
 
template<class InputIterator >
void insert (InputIterator first, InputIterator last)
 Insert Iterator range. More...
 
std::pair< iterator, bool > insert (const K &key)
 User insert as key lookup. More...
 
std::pair< iterator, bool > insert (const std::pair< K, T > &value)
 Insert key-value pair. More...
 
hm_int erase (const K &key)
 Erase by key. More...
 
iterator erase (iterator it)
 Erase by iterator. More...
 
hm_int count (const K &key) const
 Check if key exists. More...
 
hm_int count (const K &key, const_iterator it) const
 Check if key exists and matches iterator. More...
 
iterator find (const K &key)
 Search for key. Return iterator. More...
 
const_iterator find (const K &key) const
 Search for key. Return const_iterator. More...
 
T & at (const K &key)
 Data access by key. More...
 
const T & at (const K &key) const
 Const data access by key. More...
 
at (const K &key, const T &defval) const
 Return data if existent or default value. More...
 
T & operator[] (const K &key)
 Data access or empty insert. More...
 
template<typename Compare = std::less<K>>
void sort (Compare comp=Compare())
 Sort data entries. More...
 
void swap (unordered_map &other)
 
bool operator== (const unordered_map &other) const
 
bool operator!= (const unordered_map &other) const
 
void reserve (size_t n)
 
size_t size () const
 
bool empty () const
 
void clear ()
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 

Detailed Description

template<typename K, typename T, typename OPS>
class hashmap::unordered_map< K, T, OPS >

Template Parameters
K
T
OPS

Definition at line 239 of file hashmap.hpp.

Constructor & Destructor Documentation

◆ unordered_map() [1/5]

template<typename K, typename T, typename OPS>
hashmap::unordered_map< K, T, OPS >::unordered_map ( )
inline

Empty constructor.

Definition at line 497 of file hashmap.hpp.

◆ unordered_map() [2/5]

template<typename K, typename T, typename OPS>
hashmap::unordered_map< K, T, OPS >::unordered_map ( const unordered_map< K, T, OPS > &  other)
inline

Construct from another map.

Definition at line 501 of file hashmap.hpp.

◆ unordered_map() [3/5]

template<typename K, typename T, typename OPS>
hashmap::unordered_map< K, T, OPS >::unordered_map ( unordered_map< K, T, OPS > &&  other)
inline

Construct map form another map.

Definition at line 508 of file hashmap.hpp.

◆ unordered_map() [4/5]

template<typename K, typename T, typename OPS>
hashmap::unordered_map< K, T, OPS >::unordered_map ( const std::initializer_list< std::pair< K, T >> &  list)
inline

Definition at line 525 of file hashmap.hpp.

◆ unordered_map() [5/5]

template<typename K, typename T, typename OPS>
template<class InputIterator >
hashmap::unordered_map< K, T, OPS >::unordered_map ( InputIterator  first,
InputIterator  last 
)
inline

Construct from Iterator range.

Definition at line 533 of file hashmap.hpp.

Member Function Documentation

◆ at() [1/3]

template<typename K, typename T, typename OPS>
T& hashmap::unordered_map< K, T, OPS >::at ( const K &  key)
inline

Data access by key.

Definition at line 613 of file hashmap.hpp.

◆ at() [2/3]

template<typename K, typename T, typename OPS>
const T& hashmap::unordered_map< K, T, OPS >::at ( const K &  key) const
inline

Const data access by key.

Definition at line 623 of file hashmap.hpp.

◆ at() [3/3]

template<typename K, typename T, typename OPS>
T hashmap::unordered_map< K, T, OPS >::at ( const K &  key,
const T &  defval 
) const
inline

Return data if existent or default value.

Definition at line 633 of file hashmap.hpp.

◆ begin() [1/2]

template<typename K, typename T, typename OPS>
iterator hashmap::unordered_map< K, T, OPS >::begin ( )
inline

Definition at line 691 of file hashmap.hpp.

Here is the caller graph for this function:

◆ begin() [2/2]

template<typename K, typename T, typename OPS>
const_iterator hashmap::unordered_map< K, T, OPS >::begin ( ) const
inline

Definition at line 694 of file hashmap.hpp.

◆ clear()

template<typename K, typename T, typename OPS>
void hashmap::unordered_map< K, T, OPS >::clear ( )
inline

Definition at line 689 of file hashmap.hpp.

Here is the caller graph for this function:

◆ count() [1/2]

template<typename K, typename T, typename OPS>
hm_int hashmap::unordered_map< K, T, OPS >::count ( const K &  key) const
inline

Check if key exists.

Definition at line 579 of file hashmap.hpp.

Here is the caller graph for this function:

◆ count() [2/2]

template<typename K, typename T, typename OPS>
hm_int hashmap::unordered_map< K, T, OPS >::count ( const K &  key,
const_iterator  it 
) const
inline

Check if key exists and matches iterator.

Definition at line 586 of file hashmap.hpp.

◆ empty()

template<typename K, typename T, typename OPS>
bool hashmap::unordered_map< K, T, OPS >::empty ( ) const
inline

Definition at line 688 of file hashmap.hpp.

◆ end() [1/2]

template<typename K, typename T, typename OPS>
iterator hashmap::unordered_map< K, T, OPS >::end ( )
inline

Definition at line 692 of file hashmap.hpp.

Here is the caller graph for this function:

◆ end() [2/2]

template<typename K, typename T, typename OPS>
const_iterator hashmap::unordered_map< K, T, OPS >::end ( ) const
inline

Definition at line 695 of file hashmap.hpp.

◆ erase() [1/2]

template<typename K, typename T, typename OPS>
hm_int hashmap::unordered_map< K, T, OPS >::erase ( const K &  key)
inline

Erase by key.

Definition at line 565 of file hashmap.hpp.

◆ erase() [2/2]

template<typename K, typename T, typename OPS>
iterator hashmap::unordered_map< K, T, OPS >::erase ( iterator  it)
inline

Erase by iterator.

Definition at line 572 of file hashmap.hpp.

◆ find() [1/2]

template<typename K, typename T, typename OPS>
iterator hashmap::unordered_map< K, T, OPS >::find ( const K &  key)
inline

Search for key. Return iterator.

Definition at line 593 of file hashmap.hpp.

Here is the caller graph for this function:

◆ find() [2/2]

template<typename K, typename T, typename OPS>
const_iterator hashmap::unordered_map< K, T, OPS >::find ( const K &  key) const
inline

Search for key. Return const_iterator.

Definition at line 603 of file hashmap.hpp.

◆ insert() [1/3]

template<typename K, typename T, typename OPS>
template<class InputIterator >
void hashmap::unordered_map< K, T, OPS >::insert ( InputIterator  first,
InputIterator  last 
)
inline

Insert Iterator range.

Definition at line 539 of file hashmap.hpp.

◆ insert() [2/3]

template<typename K, typename T, typename OPS>
std::pair<iterator, bool> hashmap::unordered_map< K, T, OPS >::insert ( const K &  key)
inline

User insert as key lookup.

Definition at line 545 of file hashmap.hpp.

◆ insert() [3/3]

template<typename K, typename T, typename OPS>
std::pair<iterator, bool> hashmap::unordered_map< K, T, OPS >::insert ( const std::pair< K, T > &  value)
inline

Insert key-value pair.

Definition at line 555 of file hashmap.hpp.

◆ operator!=()

template<typename K, typename T, typename OPS>
bool hashmap::unordered_map< K, T, OPS >::operator!= ( const unordered_map< K, T, OPS > &  other) const
inline

Definition at line 682 of file hashmap.hpp.

◆ operator=() [1/2]

template<typename K, typename T, typename OPS>
unordered_map& hashmap::unordered_map< K, T, OPS >::operator= ( const unordered_map< K, T, OPS > &  other)
inline

Definition at line 513 of file hashmap.hpp.

◆ operator=() [2/2]

template<typename K, typename T, typename OPS>
unordered_map& hashmap::unordered_map< K, T, OPS >::operator= ( unordered_map< K, T, OPS > &&  other)
inline

Definition at line 519 of file hashmap.hpp.

◆ operator==()

template<typename K, typename T, typename OPS>
bool hashmap::unordered_map< K, T, OPS >::operator== ( const unordered_map< K, T, OPS > &  other) const
inline

Definition at line 671 of file hashmap.hpp.

◆ operator[]()

template<typename K, typename T, typename OPS>
T& hashmap::unordered_map< K, T, OPS >::operator[] ( const K &  key)
inline

Data access or empty insert.

Definition at line 643 of file hashmap.hpp.

◆ reserve()

template<typename K, typename T, typename OPS>
void hashmap::unordered_map< K, T, OPS >::reserve ( size_t  n)
inline

Definition at line 686 of file hashmap.hpp.

Here is the caller graph for this function:

◆ size()

template<typename K, typename T, typename OPS>
size_t hashmap::unordered_map< K, T, OPS >::size ( ) const
inline

Definition at line 687 of file hashmap.hpp.

Here is the caller graph for this function:

◆ sort()

template<typename K, typename T, typename OPS>
template<typename Compare = std::less<K>>
void hashmap::unordered_map< K, T, OPS >::sort ( Compare  comp = Compare())
inline

Sort data entries.

Template Parameters
Compare
Parameters
comp

Definition at line 659 of file hashmap.hpp.

Here is the caller graph for this function:

◆ swap()

template<typename K, typename T, typename OPS>
void hashmap::unordered_map< K, T, OPS >::swap ( unordered_map< K, T, OPS > &  other)
inline

Definition at line 665 of file hashmap.hpp.


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