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

template<class Col1T, class Col2T, class Col3T, class Col4T, class Col5T, class Col6T, class Col7T, class Col8T, class Col9T>
void Impala::Core::Table::SortOnColumn9 ( TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T > *  t,
bool  ascending 
)

Definition at line 294 of file Sort.h.

References Impala::Util::ApplyOrder(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn1(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn2(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn3(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn4(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn5(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn6(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn7(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn8(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn9(), Impala::Util::QuickSortCo(), Impala::Util::QuickSortDescCo(), and Impala::Core::Table::Table::Size().

Referenced by Sort().

00295 {
00296     int i;
00297     ColumnInt32 rank(t->Size());
00298     for(i=0 ; i<t->Size() ; i++)
00299         rank.Set(i, i);
00300 
00301     if(ascending)
00302         Util::QuickSortCo(t->GetColumn9()->GetData(), rank.GetData(), 0, t->Size()-1);
00303     else
00304         Util::QuickSortDescCo(t->GetColumn9()->GetData(), rank.GetData(), 0, t->Size()-1);
00305 
00306     /* compute order from the rank, so fill an array with numbers
00307        at the positions they are found in the array 'rank'.
00308        this is the 'inverse of the ordering' so to say... */
00309     ColumnInt32 order(t->Size());
00310     for(i=0 ; i<t->Size() ; i++)
00311         order.Set(rank.Get(i), i);
00312 
00313     ApplyOrder(t->GetColumn1(), &order);
00314     ApplyOrder(t->GetColumn2(), &order);
00315     ApplyOrder(t->GetColumn3(), &order);
00316     ApplyOrder(t->GetColumn4(), &order);
00317     ApplyOrder(t->GetColumn5(), &order);
00318     ApplyOrder(t->GetColumn6(), &order);
00319     ApplyOrder(t->GetColumn7(), &order);
00320     ApplyOrder(t->GetColumn8(), &order);
00321 }

Here is the call graph for this function:


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