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

RemoveRow.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Column_RemoveRow_h
00002 #define Impala_Core_Column_RemoveRow_h
00003 
00004 #include "Core/Column/InvalidColumn.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Column
00011 {
00012 
00013 
00014 template <class C>
00015 inline void
00016 RemoveRow(C* col, int row, int size)
00017 {
00018     for (int i=row ; i<size-1 ; i++)
00019         col->Set(i, col->Get(i + 1));
00020 }
00021 
00022 inline void
00023 RemoveRow(InvalidColumn* col, int row, int size)
00024 {
00025     // ignore
00026 }
00027 
00028 template <class C>
00029 inline void
00030 RemoveRow(C* col, bool* filter, int size)
00031 {
00032     int dst = 0;
00033     for (int i=0 ; i<size ; i++)
00034     {
00035         if (! filter[i])
00036         {
00037             if (i != dst)
00038                 col->Set(dst, col->Get(i));
00039             dst++;
00040         }
00041     }
00042 }
00043 
00044 inline void
00045 RemoveRow(InvalidColumn* col, bool* filter, int size)
00046 {
00047     // ignore
00048 }
00049 
00050 } // namespace Column
00051 } // namespace Core
00052 } // namespace Impala
00053 
00054 #endif

Generated on Fri Mar 19 09:31:04 2010 for ImpalaSrc by  doxygen 1.5.1