Permalink
Browse files

Updated bit vector printing in REPL.

  • Loading branch information...
MikeHopcroft committed Sep 20, 2016
1 parent e70c390 commit e91e498599b4717ffc6d83db0314c52adc3ef260
Showing with 11 additions and 7 deletions.
  1. +11 −7 tools/BitFunnel/src/Commands.cpp
@@ -478,6 +478,12 @@ namespace BitFunnel
<< ")" << std::endl;
IIngestor & ingestor = GetEnvironment().GetIngestor();
// TODO: Come up with a better heuristic for deciding which
// bits to display. Current algorithm is to display bits for
// the first 64 documents with ids less than 1000.
std::vector<DocId> ids;
for (DocId id = 0; id <= 1000; ++id)
{
@@ -491,27 +497,31 @@ namespace BitFunnel
}
}
// Print out 100s digit of DocId.
std::cout << " d ";
for (auto id : ids)
{
std::cout << id/100;
}
std::cout << std::endl;
// Print ouf 10s digit of DocId.
std::cout << " o ";
for (auto id : ids)
{
std::cout << (id/10 % 10);
}
std::cout << std::endl;
// Print out 1s digit of DocId.
std::cout << " c ";
for (auto id : ids)
{
std::cout << (id %10);
}
std::cout << std::endl;
// Print out RowIds and their bits.
for (auto row : rows)
{
std::cout
@@ -524,14 +534,8 @@ namespace BitFunnel
if (m_mode == Mode::Rows)
{
// IIngestor & ingestor = GetEnvironment().GetIngestor();
// TODO: Come up with a better heuristic for deciding which
// bits to display. Current algorithm is to display bits for
// the first 64 documents with ids less than 1000.
std::cout << ": ";
for (DocId id = 0; id <= 1000; ++id)
for (auto id : ids)
{
if (ingestor.Contains(id))
{

0 comments on commit e91e498

Please sign in to comment.