Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
vector_set< T > Class Template ReferenceVector-based set.
More...
#include <memoryaccess.h>
Inheritance diagram for vector_set< T >:
List of all members.
Detailed Description
template<class T>
class vector_set< T >
Vector-based set.
This is my own template that implements a set using the vector template for its underlying implementation. For small sets this turns out to be faster and more memory efficient that the STL set.
To make a vector work like a set, we just need to implement the insert() and find() methods. We won't worry about making sure that the other vector methods preserve the set properties -- if you use the set incorrectly, too bad.
Definition at line 70 of file memoryaccess.h.
Constructor & Destructor Documentation
template<class T> |
vector_set< T >::vector_set |
( |
|
) |
[inline] |
|
Member Function Documentation
template<class T> |
vector< T >::iterator vector_set< T >::find |
( |
T |
element |
) |
[inline] |
|
template<class T> |
vector< T >::const_iterator vector_set< T >::find |
( |
T |
element |
) |
const [inline] |
|
template<class T> |
void vector_set< T >::insert |
( |
typename vector< T >::const_iterator |
b, |
|
|
typename vector< T >::const_iterator |
e |
|
) |
[inline] |
|
template<class T> |
void vector_set< T >::insert |
( |
T |
element |
) |
[inline] |
|
The documentation for this class was generated from the following file:
|