Main Page | Class Hierarchy | Class List | File List | Class Members

FastVector< T > Class Template Reference

#include <FastVector.h>

List of all members.

Public Types

typedef vector< T >::iterator iterator
typedef vector< T >::const_iterator const_iterator

Public Member Functions

iterator fast_erase (const iterator position)
iterator erase (const iterator position)
 Erase the element at `position' from the vector.
iterator insert (const T &x)


Detailed Description

template<class T>
class FastVector< T >

This class is similar to vector, except that it can be used to erase elements very quickly by exchanging them with the last element and erasing that one instead (
See also:
fast_erase).
If csp::g_predictable is true, insert() and erase() attempt to preserve the vector elements sorted (
See also:
id_less). fast_erase() never does that.


Member Function Documentation

template<class T>
iterator FastVector< T >::fast_erase const iterator  position  )  [inline]
 

Erase an element from the vector. This is the same as erase(), except that the order of the elements is not preserved. It should be used whenever the order of the elements is not important.

template<class T>
iterator FastVector< T >::insert const T &  x  )  [inline]
 

Insert x into the vector.

Parameters:
x the object to be inserted.
Returns:
the position selected for the object.


The documentation for this class was generated from the following file:
Generated on Wed May 25 12:21:18 2005 for csp.kdevelop by  doxygen 1.3.9.1