|
template<class Col1T, class Col2T, class Col3T, class Col4T, class Col5T, class Col6T, class Col7T, class Col8T, class Col9T>
void Impala::Core::Table::SortOnColumn8 |
( |
TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T > * |
t, |
|
|
bool |
ascending | |
|
) |
| | |
Definition at line 263 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(). 00264 {
00265 int i;
00266 ColumnInt32 rank(t->Size());
00267 for(i=0 ; i<t->Size() ; i++)
00268 rank.Set(i, i);
00269
00270 if(ascending)
00271 Util::QuickSortCo(t->GetColumn8()->GetData(), rank.GetData(), 0, t->Size()-1);
00272 else
00273 Util::QuickSortDescCo(t->GetColumn8()->GetData(), rank.GetData(), 0, t->Size()-1);
00274
00275
00276
00277
00278 ColumnInt32 order(t->Size());
00279 for(i=0 ; i<t->Size() ; i++)
00280 order.Set(rank.Get(i), i);
00281
00282 ApplyOrder(t->GetColumn1(), &order);
00283 ApplyOrder(t->GetColumn2(), &order);
00284 ApplyOrder(t->GetColumn3(), &order);
00285 ApplyOrder(t->GetColumn4(), &order);
00286 ApplyOrder(t->GetColumn5(), &order);
00287 ApplyOrder(t->GetColumn6(), &order);
00288 ApplyOrder(t->GetColumn7(), &order);
00289 ApplyOrder(t->GetColumn9(), &order);
00290 }
Here is the call graph for this function:
|