Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes
vbl_batch_multimap< K, T, C > Class Template Reference

A fast read and batch-write map-style collection. More...

#include <vbl_batch_multimap.h>

List of all members.

Classes

class  value_compare_t

Public Types

typedef T mapped_type
typedef vcl_pair< key_type,
mapped_type
value_type
typedef C key_compare
typedef vcl_vector< value_typecontainer_type
typedef
container_type::allocator_type 
allocator_type
typedef
container_type::const_iterator 
const_iterator
typedef
container_type::const_reference 
const_reference

Public Member Functions

 vbl_batch_multimap ()
template<typename CI >
 vbl_batch_multimap (CI start, CI finish)
template<typename CI >
void assign (CI start, CI finish)
 Change all the values in the multimap.
template<typename CI >
void assign_sorted (CI start, CI finish)
 Change all the values in the multimap, to a ready sorted sequence.
void swap (vbl_batch_multimap &rhs)
bool operator== (const vbl_batch_multimap &rhs)
const_iterator begin () const
const_iterator end () const
bool empty () const
vcl_size_t size () const
const_iterator lower_bound (const key_type &key) const
 Finds the beginning of a subsequence matching given key.
const_iterator upper_bound (const key_type &key) const
 Finds the one past the end of a subsequence matching given key.
vcl_pair< const_iterator,
const_iterator
equal_range (const key_type &key) const
 A more efficient make_pair(lower_bound(...), upper_bound(...)).
const_iterator find (const key_type &key) const
 Finds the first matching value in the sequence, or returns end() if no match,.
vcl_size_t count (const key_type &key) const
 Finds the number of elements with matching key,.

Static Public Member Functions

typedef K key_type

Static Private Member Functions

template<typename CI , typename CMP >
static bool is_sorted (CI start, CI end, CMP comp)

Private Attributes

container_type data_

Detailed Description

template<typename K, typename T, typename C = vcl_less<K>>
class vbl_batch_multimap< K, T, C >

A fast read and batch-write map-style collection.

This container stores its elements in a single vector, and has fast construction and deletion. It has all the const-access map fundtions, but its contents can only be modified all-at-once.

Definition at line 26 of file vbl_batch_multimap.h.


Member Typedef Documentation

template<typename K, typename T, typename C = vcl_less<K>>
typedef container_type::allocator_type vbl_batch_multimap< K, T, C >::allocator_type

Definition at line 34 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
typedef container_type::const_iterator vbl_batch_multimap< K, T, C >::const_iterator

Definition at line 36 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
typedef container_type::const_reference vbl_batch_multimap< K, T, C >::const_reference

Definition at line 38 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
typedef vcl_vector<value_type> vbl_batch_multimap< K, T, C >::container_type

Definition at line 33 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
typedef C vbl_batch_multimap< K, T, C >::key_compare

Definition at line 32 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
typedef K vbl_batch_multimap< K, T, C >::key_type [static]

Definition at line 29 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
typedef T vbl_batch_multimap< K, T, C >::mapped_type

Definition at line 30 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
typedef vcl_pair<key_type, mapped_type> vbl_batch_multimap< K, T, C >::value_type

Definition at line 31 of file vbl_batch_multimap.h.


Constructor & Destructor Documentation

template<typename K, typename T, typename C = vcl_less<K>>
vbl_batch_multimap< K, T, C >::vbl_batch_multimap ( ) [inline]

Definition at line 62 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
template<typename CI >
vbl_batch_multimap< K, T, C >::vbl_batch_multimap ( CI  start,
CI  finish 
) [inline]

Definition at line 65 of file vbl_batch_multimap.h.


Member Function Documentation

template<typename K, typename T, typename C = vcl_less<K>>
template<typename CI >
void vbl_batch_multimap< K, T, C >::assign ( CI  start,
CI  finish 
) [inline]

Change all the values in the multimap.

Definition at line 73 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
template<typename CI >
void vbl_batch_multimap< K, T, C >::assign_sorted ( CI  start,
CI  finish 
) [inline]

Change all the values in the multimap, to a ready sorted sequence.

The input values must already be sorted on their v.first members.

Definition at line 82 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
const_iterator vbl_batch_multimap< K, T, C >::begin ( ) const [inline]

Definition at line 101 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
vcl_size_t vbl_batch_multimap< K, T, C >::count ( const key_type key) const [inline]

Finds the number of elements with matching key,.

Definition at line 144 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
bool vbl_batch_multimap< K, T, C >::empty ( ) const [inline]

Definition at line 103 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
const_iterator vbl_batch_multimap< K, T, C >::end ( ) const [inline]

Definition at line 102 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
vcl_pair<const_iterator, const_iterator> vbl_batch_multimap< K, T, C >::equal_range ( const key_type key) const [inline]

A more efficient make_pair(lower_bound(...), upper_bound(...)).

Definition at line 127 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
const_iterator vbl_batch_multimap< K, T, C >::find ( const key_type key) const [inline]

Finds the first matching value in the sequence, or returns end() if no match,.

Definition at line 134 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
template<typename CI , typename CMP >
static bool vbl_batch_multimap< K, T, C >::is_sorted ( CI  start,
CI  end,
CMP  comp 
) [inline, static, private]

Definition at line 155 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
const_iterator vbl_batch_multimap< K, T, C >::lower_bound ( const key_type key) const [inline]

Finds the beginning of a subsequence matching given key.

/return iterator to the first element that equals key, or the next greatest element if no match is found.

Definition at line 111 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
bool vbl_batch_multimap< K, T, C >::operator== ( const vbl_batch_multimap< K, T, C > &  rhs) [inline]

Definition at line 94 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
vcl_size_t vbl_batch_multimap< K, T, C >::size ( ) const [inline]

Definition at line 104 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
void vbl_batch_multimap< K, T, C >::swap ( vbl_batch_multimap< K, T, C > &  rhs) [inline]

Definition at line 88 of file vbl_batch_multimap.h.

template<typename K, typename T, typename C = vcl_less<K>>
const_iterator vbl_batch_multimap< K, T, C >::upper_bound ( const key_type key) const [inline]

Finds the one past the end of a subsequence matching given key.

/return iterator to one past the last element that equals key, or to the next greatest element if no match is found.

Definition at line 120 of file vbl_batch_multimap.h.


Member Data Documentation

template<typename K, typename T, typename C = vcl_less<K>>
container_type vbl_batch_multimap< K, T, C >::data_ [private]

Definition at line 152 of file vbl_batch_multimap.h.


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