[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
#include <vigra/array_vector.hxx>
Replacement for std::vector.
This template implements the same functionality as std::vector (see there for detailed documentation). However, it gives two useful guarantees, that std::vector fails to provide:
T * This means that memory managed by ArrayVector can be passed to algorithms that expect raw memory. This is especially important when legacy or C code has to be called, but it is also useful for certain optimizations.
Moreover, ArrayVector is derived from ArrayVectorView so that one can create views of the array (in particular, subarrays). This implies another important difference to std::vector: the indexing operator (ArrayVector::operator[]) takes signed indices. In this way, an ArrayVectorView can be used with negative indices:
Refer to the documentation of std::vector for a detailed description of ArrayVector functionality.
#include <vigra/array_vector.hxx>
Namespace: vigra
|
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |