#include <sorted_map.h>

Public Types | |
| typedef pair< KEY, RANGE > | MAP_ELEMENT |
| typedef vector< MAP_ELEMENT > | MAP_VECTOR |
| typedef MAP_VECTOR::size_type | MAP_SIZE |
Public Member Functions | |
| SORTED_MAP () | |
| SORTED_MAP (MAP_SIZE chunksize) | |
| SORTED_MAP (const MAP_VECTOR &vector) | |
| bool | empty () const |
| MAP_SIZE | size () const |
| MAP_SIZE | capacity () const |
| void | clear () |
| void | push_back (const MAP_ELEMENT &amap) |
| const RANGE & | operator[] (KEY k) const |
| RANGE & | operator[] (KEY k) |
Private Member Functions | |
| MAP_SIZE | _binary_search (MAP_SIZE from, MAP_SIZE till, KEY k) |
| void | _sort () |
| BOOL | _is_sorted () const |
Private Attributes | |
| BOOL | _sorted |
| MAP_SIZE | _chunksize |
| MAP_VECTOR | _map |
Definition at line 57 of file sorted_map.h.
| typedef pair<KEY, RANGE> SORTED_MAP< KEY, RANGE >::MAP_ELEMENT |
Definition at line 61 of file sorted_map.h.
| typedef MAP_VECTOR::size_type SORTED_MAP< KEY, RANGE >::MAP_SIZE |
Definition at line 63 of file sorted_map.h.
| typedef vector<MAP_ELEMENT> SORTED_MAP< KEY, RANGE >::MAP_VECTOR |
Definition at line 62 of file sorted_map.h.
| SORTED_MAP< KEY, RANGE >::SORTED_MAP | ( | ) | [inline] |
Definition at line 91 of file sorted_map.h.
| SORTED_MAP< KEY, RANGE >::SORTED_MAP | ( | MAP_SIZE | chunksize | ) | [inline] |
Definition at line 93 of file sorted_map.h.
| SORTED_MAP< KEY, RANGE >::SORTED_MAP | ( | const MAP_VECTOR & | vector | ) | [inline] |
Definition at line 96 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_is_sorted(), and SORTED_MAP< KEY, RANGE >::_sorted.

| SORTED_MAP< KEY, RANGE >::MAP_SIZE SORTED_MAP< KEY, RANGE >::_binary_search | ( | MAP_SIZE | from, | |
| MAP_SIZE | till, | |||
| KEY | k | |||
| ) | [private] |
Definition at line 152 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_map, SORTED_MAP< KEY, RANGE >::_sort(), SORTED_MAP< KEY, RANGE >::_sorted, and idx.
Referenced by SORTED_MAP< KEY, RANGE >::operator[]().

| BOOL SORTED_MAP< KEY, RANGE >::_is_sorted | ( | ) | const [inline, private] |
Definition at line 79 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_map, and SORTED_MAP< KEY, RANGE >::size().
Referenced by SORTED_MAP< KEY, RANGE >::SORTED_MAP().

| void SORTED_MAP< KEY, RANGE >::_sort | ( | ) | [inline, private] |
Definition at line 73 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_sorted, FALSE, and FmtAssert.
Referenced by SORTED_MAP< KEY, RANGE >::_binary_search().
| MAP_SIZE SORTED_MAP< KEY, RANGE >::capacity | ( | ) | const [inline] |
Definition at line 111 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_map.
| void SORTED_MAP< KEY, RANGE >::clear | ( | ) | [inline] |
Definition at line 116 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_map, and SORTED_MAP< KEY, RANGE >::_sorted.
| bool SORTED_MAP< KEY, RANGE >::empty | ( | ) | const [inline] |
Definition at line 101 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_map.
Referenced by SORTED_MAP< KEY, RANGE >::push_back().
| RANGE& SORTED_MAP< KEY, RANGE >::operator[] | ( | KEY | k | ) | [inline] |
Definition at line 139 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_binary_search(), SORTED_MAP< KEY, RANGE >::_map, idx, and Is_True.

| const RANGE& SORTED_MAP< KEY, RANGE >::operator[] | ( | KEY | k | ) | const [inline] |
Definition at line 131 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_binary_search(), SORTED_MAP< KEY, RANGE >::_map, idx, and Is_True.

| void SORTED_MAP< KEY, RANGE >::push_back | ( | const MAP_ELEMENT & | amap | ) | [inline] |
Definition at line 122 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_chunksize, SORTED_MAP< KEY, RANGE >::_map, SORTED_MAP< KEY, RANGE >::_sorted, and SORTED_MAP< KEY, RANGE >::empty().

| MAP_SIZE SORTED_MAP< KEY, RANGE >::size | ( | ) | const [inline] |
Definition at line 106 of file sorted_map.h.
References SORTED_MAP< KEY, RANGE >::_map.
Referenced by SORTED_MAP< KEY, RANGE >::_is_sorted().
MAP_SIZE SORTED_MAP< KEY, RANGE >::_chunksize [private] |
Definition at line 68 of file sorted_map.h.
Referenced by SORTED_MAP< KEY, RANGE >::push_back().
MAP_VECTOR SORTED_MAP< KEY, RANGE >::_map [private] |
Definition at line 69 of file sorted_map.h.
Referenced by SORTED_MAP< KEY, RANGE >::_binary_search(), SORTED_MAP< KEY, RANGE >::_is_sorted(), SORTED_MAP< KEY, RANGE >::capacity(), SORTED_MAP< KEY, RANGE >::clear(), SORTED_MAP< KEY, RANGE >::empty(), SORTED_MAP< KEY, RANGE >::operator[](), SORTED_MAP< KEY, RANGE >::push_back(), and SORTED_MAP< KEY, RANGE >::size().
BOOL SORTED_MAP< KEY, RANGE >::_sorted [private] |
Definition at line 67 of file sorted_map.h.
Referenced by SORTED_MAP< KEY, RANGE >::_binary_search(), SORTED_MAP< KEY, RANGE >::_sort(), SORTED_MAP< KEY, RANGE >::clear(), SORTED_MAP< KEY, RANGE >::push_back(), and SORTED_MAP< KEY, RANGE >::SORTED_MAP().
1.7.1