Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

virtual void Impala::Core::Table::SimilarityTableSet::DumpRanking ( Database::RawDataSet set,
int  from = 0,
int  to = -1 
) [inline, virtual]

Definition at line 624 of file SimilarityTableSet.h.

References FindQuid(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), GetDescription(), GetName(), GetRankTable(), GetSimTable(), ILOG_ERROR, mQuids, NrTables(), Impala::Core::Database::RawDataSet::QuidToString(), Impala::Core::Table::Table::Size(), and TableSize().

00625     {
00626         if (to == -1 || to > TableSize())
00627             to = TableSize();
00628         if (to < from)
00629             to = from;
00630         std::cout << "SimilarityTableSet " << GetDescription() << std::endl;
00631         for (int t=0 ; t<NrTables() ; t++)
00632         {
00633             SimTableType* simTable = GetSimTable(t);
00634             RankTableType* rankTable = GetRankTable(t);
00635             std::cout << "table " << t << ", name = " << GetName(t) << std::endl;
00636             if (simTable->Size() != mQuids->Size())
00637             {
00638                 ILOG_ERROR("DumpRanking: simtable size doesn't match");
00639                 continue;
00640             }
00641             if (rankTable->Size() != mQuids->Size())
00642             {
00643                 ILOG_ERROR("DumpRanking: ranktable size doesn't match");
00644                 continue;
00645             }
00646             std::cout << "i, Quid, similarity, rank, sim_at_rank" << std::endl;
00647             for (int i=from ; i<to ; i++)
00648             {
00649                 Quid quid = mQuids->Get1(i);
00650                 std::cout << i << ", ";
00651                 if(set)
00652                     std::cout << set->QuidToString(quid, true) << ", ";
00653                 else
00654                     std::cout << QuidObj(quid) << ", ";
00655                 std::cout << simTable->Get1(i) << ", ";
00656                 int rank = FindQuid(rankTable->Get1(i));
00657                 std::cout << rank << ", " << simTable->Get1(rank) << std::endl;
00658             }
00659             std::cout << std::endl;
00660         }
00661     }

Here is the call graph for this function:


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