Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pre_ranking_info.cpp « search - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5b579d7ae4ad96f13ad3bf30e765f68053a8df61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "search/pre_ranking_info.hpp"

#include <sstream>

namespace search
{
std::string DebugPrint(PreRankingInfo const & info)
{
  std::ostringstream os;
  os << "PreRankingInfo [";
  os << "m_distanceToPivot:" << info.m_distanceToPivot << ",";
  for (size_t i = 0; i < static_cast<size_t>(SearchModel::SEARCH_TYPE_COUNT); ++i)
  {
    if (info.m_tokenRange[i].Empty())
      continue;

    auto const type = static_cast<SearchModel::SearchType>(i);
    os << "m_tokenRange[" << DebugPrint(type) << "]:" << DebugPrint(info.m_tokenRange[i]) << ",";
  }
  os << "m_rank:" << static_cast<int>(info.m_rank) << ",";
  os << "m_searchType:" << info.m_searchType;
  os << "]";
  return os.str();
}
}  // namespace search