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

template<class C>
bool Impala::Core::Column::IsSortedAscending ( C *  col,
int  nrElem 
) [inline]

Check whether column is sorted in ascending order.

Definition at line 19 of file IsSorted.h.

References ILOG_ERROR, and ILOG_VAR.

Referenced by Impala::Core::Table::QuidTable::UpdateGroups().

00020 {
00021     ILOG_VAR(Impala.Core.Column.IsSortedAscending);
00022     if (col->Capacity() == 0)
00023     {
00024         // no warning in case of empty column
00025         return true;
00026     }
00027     if (nrElem > col->Capacity())
00028     {
00029         ILOG_ERROR("nrElem larger than capacity");
00030         return false;
00031     }
00032     for (int i=0 ; i<nrElem-1 ; i++)
00033         if (col->Get(i) > col->Get(i+1))
00034             return false;
00035     return true;
00036 }


Generated on Thu Jan 13 09:18:48 2011 for ImpalaSrc by  doxygen 1.5.1