Definition at line 330 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(). 00331 { 00332 if (mQuids->Size() < topN) 00333 { 00334 ILOG_ERROR("ComputeRanksTopN: not enough quids for top " << topN); 00335 return; 00336 } 00337 if (mRanks[0]->Capacity() != topN) 00338 { 00339 for (int i=0 ; i<NrTables() ; i++) 00340 { 00341 mRanks[i]->Reserve(topN, false); 00342 mRanks[i]->SetSize(topN); // will be filled below 00343 } 00344 } 00345 Column::ColumnTem<Real64>* tmp = new Column::ColumnTem<Real64>(topN); 00346 for (int i=0 ; i<NrTables() ; i++) 00347 { 00348 if (descending) 00349 Column::SortDescendingTopN(mQuids->GetColumn1(), 00350 mSims[i]->GetColumn1(), 00351 mRanks[i]->GetColumn1(), tmp); 00352 else 00353 Column::SortAscendingTopN(mQuids->GetColumn1(), 00354 mSims[i]->GetColumn1(), 00355 mRanks[i]->GetColumn1(), tmp); 00356 } 00357 delete tmp; 00358 }
Here is the call graph for this function:
|