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

template<class C1, class C2>
int Impala::Core::Column::CopyUnique ( C1 *  dst,
C2 *  src,
int  dstStart,
int  srcStart,
int  srcSize 
) [inline]

Copy elements in the range [srcStart,srcSize) of src to dst provided they are not already present in the range [0,dstStart) of dst.

The function returns the number of elements copied to dst.

Definition at line 20 of file CopyUnique.h.

References Contains().

00021 {
00022     int nr = 0;
00023     for (int i=srcStart ; i<srcSize ; i++)
00024     {
00025         if (!Contains(dst, src->Get(i), 0, dstStart + nr))
00026         {
00027             dst->Set(dstStart + nr++, src->Get(i));
00028             if (dstStart + nr >= dst->Capacity())
00029                 return nr;
00030         }
00031     }
00032     return nr;
00033 }

Here is the call graph for this function:


Generated on Fri Mar 19 11:06:10 2010 for ImpalaSrc by  doxygen 1.5.1