table_index< Key, T, Transform, Compare > Class Template Reference
Detailed Descriptiontemplate<typename Key, typename T, typename Transform = mem_data_t<T, const Key>, typename Compare = std::less<Key>>
|
table_index | ( | TransformPrimitive | transform, |
const key_compare & | compare = key_compare() |
||
) | [explicit] |
- Parameters:
-
transform ConvertibleToFunction to be converted to the transformation function for this index compare key comparison function for this index
Definition at line 695 of file table_index.hpp.
table_index | ( | const transform_type & | transform, |
const key_compare & | compare = key_compare() |
||
) | [explicit] |
- Parameters:
-
transform transformation function for this index compare key comparison function for this index
Definition at line 817 of file table_index.hpp.
table_index | ( | InputIterator | first, |
InputIterator | last, | ||
TransformPrimitive | transform, | ||
const key_compare & | compare = key_compare() |
||
) |
Definition at line 702 of file table_index.hpp.
Member Function Documentation
table_index< Key, T, Compare, Transform >::const_reference at | ( | size_type | n | ) | const |
- Parameters:
-
n index into the table.
- Returns:
- Element
n
in the table.
Definition at line 1022 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::reference at | ( | size_type | n | ) |
- Parameters:
-
n index into the table.
- Returns:
- Element
n
in the table.
Definition at line 1013 of file table_index.hpp.
- Returns:
- The last element in the table.
adobe::table_index::const_reference back | ( | ) | const |
- Returns:
- The last element in the table.
table_index< Key, T, Compare, Transform >::iterator begin | ( | ) |
- Returns:
- An iterator pointing to the beginning of the table_index.
Definition at line 827 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::const_iterator begin | ( | ) | const |
- Returns:
- A const_iterator pointing to the beginning of the table_index.
Definition at line 836 of file table_index.hpp.
void clear | ( | ) |
Erases the entire table_index.
Definition at line 987 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::size_type count | ( | const key_type & | x | ) | const |
- Precondition:
- table must be sorted.
- Parameters:
-
x key value to count within the index
- Returns:
- Count of the elements with key value
x
.
Definition at line 1087 of file table_index.hpp.
bool empty | ( | ) | const |
- Returns:
true
if the table_index's size is 0.
Definition at line 916 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::iterator end | ( | ) |
- Returns:
- An iterator pointing to the end of the table_index.
Definition at line 845 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::const_iterator end | ( | ) | const |
- Returns:
- A const_iterator pointing to the end of the table_index.
Definition at line 854 of file table_index.hpp.
std::pair< typename table_index< Key, T, Compare, Transform >::iterator, typename table_index< Key, T, Compare, Transform >::iterator > equal_range | ( | const key_type & | x | ) |
- Precondition:
- table must be sorted.
- Parameters:
-
x key value to find within the index
- Returns:
- Essentially a combination of the values returned by lower_bound and upper_bound
Definition at line 1137 of file table_index.hpp.
std::pair< typename table_index< Key, T, Compare, Transform >::const_iterator, typename table_index< Key, T, Compare, Transform >::const_iterator > equal_range | ( | const key_type & | x | ) | const |
- Precondition:
- table must be sorted.
- Parameters:
-
x key value to find within the index
- Returns:
- Essentially a combination of the values returned by lower_bound and upper_bound
Definition at line 1148 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::iterator erase | ( | iterator | location | ) |
- Parameters:
-
position iterator to the element to be removed from the index
- Returns:
- An iterator pointing to the next element after the one removed from the index
Definition at line 970 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::iterator erase | ( | iterator | first, |
iterator | last | ||
) |
- Parameters:
-
first Iterator to the first element to be erased from the index last Iterator to one past the last element to be erased from the index
- Returns:
- An iterator pointing to to the next element after the ones removed from the index
Definition at line 979 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::iterator find | ( | const key_type & | x | ) |
- Precondition:
- table must be sorted.
- Parameters:
-
x key value to find within the index
- Returns:
- Iterator to the element with key value
x
, orend()
if there is none.
Definition at line 1059 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::const_iterator find | ( | const key_type & | x | ) | const |
- Precondition:
- table must be sorted.
- Parameters:
-
x key value to find within the index
- Returns:
- Iterator to the element with key value
x
, orend()
if there is none.
Definition at line 1073 of file table_index.hpp.
- Returns:
- The first element in the table.
adobe::table_index::const_reference front | ( | ) | const |
- Returns:
- The first element in the table.
table_index< Key, T, Compare, Transform >::index_type & index | ( | ) |
- Returns:
- All the elements in the index in a
std::vector
Definition at line 1158 of file table_index.hpp.
const table_index< Key, T, Compare, Transform >::index_type & index | ( | ) | const |
- Returns:
- All the elements in the index in a
std::vector
Definition at line 1167 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::iterator insert | ( | iterator | position, |
value_type & | x | ||
) |
- Parameters:
-
position position at which the new element is to be inserted x The element to insert as the position specified
- Returns:
- An iterator pointing to the new element.
- Postcondition:
x
must exist as long as this table's reference to it exists.
Definition at line 941 of file table_index.hpp.
- Parameters:
-
position position at which the new elements are to be inserted first Iterator to the first new element to be inserted last Iterator to one past the last new element to be inserted
- Postcondition:
- The elements found in
(first, last]
must exist as long as this table's references to them exist.
Definition at line 955 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::iterator lower_bound | ( | const key_type & | x | ) |
- Precondition:
- table must be sorted.
- Parameters:
-
x key value to find within the index
- Returns:
- The first position where the element transformed to
x
could be inserted without violating the ordering of the table.
Definition at line 1096 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::const_iterator lower_bound | ( | const key_type & | x | ) | const |
- Precondition:
- table must be sorted.
- Parameters:
-
x key value to find within the index
- Returns:
- The first position where the element transformed to
x
could be inserted without violating the ordering of the table.
Definition at line 1106 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::size_type max_size | ( | ) | const |
- Returns:
- The largest possible size of the table_index.
Definition at line 899 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::reference operator[] | ( | const key_type & | key | ) |
- Precondition:
- table must be sorted.
- Parameters:
-
key key value to find in the table index.
- Returns:
- One or more adjacent values whose keys match
key
.
Definition at line 1031 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::const_reference operator[] | ( | const key_type & | key | ) | const |
- Precondition:
- table must be sorted.
- Parameters:
-
key key value to find in the table index.
- Returns:
- One or more adjacent values whose keys match
key
.
Definition at line 1045 of file table_index.hpp.
void pop_back | ( | ) |
Eliminates the last element from the table.
Definition at line 932 of file table_index.hpp.
void push_back | ( | value_type & | x | ) |
- Parameters:
-
x The element to insert at the end of the table
- Postcondition:
x
must exist as long as this table's reference to it exists.
Definition at line 924 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::reverse_iterator rbegin | ( | ) |
- Returns:
- A reverse_iterator pointing to the beginning of the reversed table_index.
Definition at line 863 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::const_reverse_iterator rbegin | ( | ) | const |
- Returns:
- A const_reverse_iterator pointing to the beginning of the reversed table_index.
Definition at line 872 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::reverse_iterator rend | ( | ) |
- Returns:
- A reverse_iterator pointing to the end of the reversed table_index.
Definition at line 881 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::const_reverse_iterator rend | ( | ) | const |
- Returns:
- A const_reverse_iterator pointing to the end of the reversed table_index.
Definition at line 890 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::size_type size | ( | ) | const |
- Returns:
- Returns the size of the table_index.
Definition at line 908 of file table_index.hpp.
void sort | ( | ) |
Sorts all the elements in the table based on their transformed values as compared with the key_compare function object.
Definition at line 995 of file table_index.hpp.
transform_type transform | ( | ) | const |
Definition at line 777 of file table_index.hpp.
void unique | ( | ) |
Reduces the index to a single value per key.
Definition at line 1003 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::iterator upper_bound | ( | const key_type & | x | ) |
- Precondition:
- table must be sorted.
- Parameters:
-
x key value to find within the index
- Returns:
- The last position where the element transformed to
x
could be inserted without violating the ordering of the table.
Definition at line 1116 of file table_index.hpp.
table_index< Key, T, Compare, Transform >::const_iterator upper_bound | ( | const key_type & | x | ) | const |
- Precondition:
- table must be sorted.
- Parameters:
-
x key value to find within the index
- Returns:
- The last position where the element transformed to
x
could be inserted without violating the ordering of the table.
Definition at line 1126 of file table_index.hpp.
Friends And Related Function Documentation
void swap | ( | adobe::table_index< Key, T, Transform, Compare > & | x, |
adobe::table_index< Key, T, Transform, Compare > & | y | ||
) | [related] |
Swaps the contents of two table_indexes.
- Parameters:
-
x the first table_index to swap. y the second table_index to swap.
void swap | ( | table_index< Key, T, Transform, Compare > & | x, |
table_index< Key, T, Transform, Compare > & | y | ||
) | [friend] |
Definition at line 779 of file table_index.hpp.