|
template<class Col1T, class Col2T, class Col3T, class Col4T, class Col5T, class Col6T, class Col7T, class Col8T, class Col9T>
void Impala::Core::Table::SortOnColumn1 |
( |
TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T > * |
t, |
|
|
bool |
ascending | |
|
) |
| | |
Definition at line 46 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(). 00047 {
00048 int i;
00049 ColumnInt32 rank(t->Size());
00050 for(i=0 ; i<t->Size() ; i++)
00051 rank.Set(i, i);
00052
00053 if(ascending)
00054 Util::QuickSortCo(t->GetColumn1()->GetData(), rank.GetData(), 0, t->Size()-1);
00055 else
00056 Util::QuickSortDescCo(t->GetColumn1()->GetData(), rank.GetData(), 0, t->Size()-1);
00057
00058
00059
00060
00061 ColumnInt32 order(t->Size());
00062 for(i=0 ; i<t->Size() ; i++)
00063 order.Set(rank.Get(i), i);
00064
00065 ApplyOrder(t->GetColumn2(), &order);
00066 ApplyOrder(t->GetColumn3(), &order);
00067 ApplyOrder(t->GetColumn4(), &order);
00068 ApplyOrder(t->GetColumn5(), &order);
00069 ApplyOrder(t->GetColumn6(), &order);
00070 ApplyOrder(t->GetColumn7(), &order);
00071 ApplyOrder(t->GetColumn8(), &order);
00072 ApplyOrder(t->GetColumn9(), &order);
00073 }
Here is the call graph for this function:
|