Definition at line 316 of file SimilarityTableSet.h. References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::GetColumn1(), ILOG_ERROR, mQuids, mRanks, mSims, NrTables(), Impala::Core::Table::Table::Size(), Impala::Core::Column::SortAscendingTopN(), and Impala::Core::Column::SortDescendingTopN(). Referenced by Impala::Core::Trec::ThreadVisualSimilarity::GetNearestFrameQuid(), Impala::Visualization::FeatureTableSetRank::HandleNewFile(), and Impala::Core::Trec::ThreadVisualSimilarity::SetOrigin(). 00317 { 00318 if (mQuids->Size() < topN) 00319 { 00320 ILOG_ERROR("ComputeRanksTopN: not enough quids for top " << topN); 00321 return; 00322 } 00323 if (mRanks[0]->Capacity() != topN) 00324 { 00325 for (int i=0 ; i<NrTables() ; i++) 00326 { 00327 mRanks[i]->Reserve(topN, false); 00328 mRanks[i]->SetSize(topN); // will be filled below 00329 } 00330 } 00331 Column::ColumnTem<Real64>* tmp = new Column::ColumnTem<Real64>(topN); 00332 for (int i=0 ; i<NrTables() ; i++) 00333 { 00334 if (descending) 00335 Column::SortDescendingTopN(mQuids->GetColumn1(), 00336 mSims[i]->GetColumn1(), 00337 mRanks[i]->GetColumn1(), tmp); 00338 else 00339 Column::SortAscendingTopN(mQuids->GetColumn1(), 00340 mSims[i]->GetColumn1(), 00341 mRanks[i]->GetColumn1(), tmp); 00342 } 00343 delete tmp; 00344 }
Here is the call graph for this function:
|