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

template<class C1, class C2>
void Impala::Core::Column::SortAscending ( C1 *  first,
C2 *  second,
int  nrElem 
) [inline]

Sort columns first and second in ascending order based on the values in the second column.

Definition at line 21 of file Sort.h.

References ILOG_ERROR, ILOG_VAR, and Impala::Util::QuickSortCo().

Referenced by Impala::Core::Table::SimilarityTableSet::ComputeRank(), and Impala::Core::Table::SimilarityTableSet::ComputeRanks().

00022 {
00023     ILOG_VAR(Impala.Core.Column.SortAscending);
00024     if (first->Capacity() == 0 || second->Capacity() == 0)
00025     {
00026         // no warning in case of empty column
00027         return;
00028     }
00029     if ((nrElem > first->Capacity()) || (nrElem > second->Capacity()))
00030     {
00031         ILOG_ERROR("Incompatible sizes");
00032         return;
00033     }
00034 
00035     // for some reason Dennis and Michiel chose different calling order for
00036     // the sorted and unsorted parameter
00037     Util::QuickSortCo(second->GetData(), first->GetData(), 0, nrElem - 1);
00038 }

Here is the call graph for this function:


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