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::SortOnColumn7 ( TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T > *  t,
bool  ascending 
)

Definition at line 232 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().

00233 {
00234     int i;
00235     ColumnInt32 rank(t->Size());
00236     for(i=0 ; i<t->Size() ; i++)
00237         rank.Set(i, i);
00238 
00239     if(ascending)
00240         Util::QuickSortCo(t->GetColumn7()->GetData(), rank.GetData(), 0, t->Size()-1);
00241     else
00242         Util::QuickSortDescCo(t->GetColumn7()->GetData(), rank.GetData(), 0, t->Size()-1);
00243 
00244     /* compute order from the rank, so fill an array with numbers
00245        at the positions they are found in the array 'rank'.
00246        this is the 'inverse of the ordering' so to say... */
00247     ColumnInt32 order(t->Size());
00248     for(i=0 ; i<t->Size() ; i++)
00249         order.Set(rank.Get(i), i);
00250 
00251     ApplyOrder(t->GetColumn1(), &order);
00252     ApplyOrder(t->GetColumn2(), &order);
00253     ApplyOrder(t->GetColumn3(), &order);
00254     ApplyOrder(t->GetColumn4(), &order);
00255     ApplyOrder(t->GetColumn5(), &order);
00256     ApplyOrder(t->GetColumn6(), &order);
00257     ApplyOrder(t->GetColumn8(), &order);
00258     ApplyOrder(t->GetColumn9(), &order);
00259 }

Here is the call graph for this function:


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