Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

template<class collectionT>
void Impala::Util::SubSelectInPlace ( collectionT *  collection,
int  start,
int  number 
)

Utility function to select a range in a stl collection (vector, deque, list).

The selected range is [start, start+number). Type collectionT is asusmed to implement erase, size, begin and end

Definition at line 14 of file StlHelpers.h.

Referenced by Impala::Core::DataFactory::MakeConceptList(), and Impala::Util::Mpi::SelectWorkLoadInPlace().

00015 {
00016     if(start > 0)
00017         collection->erase(collection->begin(), collection->begin() + start);
00018     if(number != -1)
00019         if(number < collection->size())
00020             collection->erase(collection->begin() + number, 
00021                               collection->end());
00022 }


Generated on Fri Mar 19 11:39:16 2010 for ImpalaSrc by  doxygen 1.5.1