Home || Visual Search || Applications || Architecture || 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 620 of file SimilarityTableSet.h.

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

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

Here is the call graph for this function:


Generated on Thu Jan 13 09:20:52 2011 for ImpalaSrc by  doxygen 1.5.1