Files
comaps/search/pre_ranking_info.cpp
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

33 lines
940 B
C++

#include "search/pre_ranking_info.hpp"
#include <sstream>
namespace search
{
std::string DebugPrint(PreRankingInfo const & info)
{
std::ostringstream os;
os << std::boolalpha << "PreRankingInfo "
<< "{ m_distanceToPivot: " << info.m_distanceToPivot
<< ", m_tokenRanges [ ";
for (size_t i = 0; i < Model::TYPE_COUNT; ++i)
{
if (info.m_tokenRanges[i].Empty())
continue;
auto const type = static_cast<Model::Type>(i);
os << DebugPrint(type) << " : " << DebugPrint(info.m_tokenRanges[i]) << ", ";
}
os << " ]"
<< ", m_rank: " << static_cast<int>(info.m_rank)
<< ", m_popularity: " << static_cast<int>(info.m_popularity)
<< ", m_type: " << DebugPrint(info.m_type)
<< ", m_allTokensUsed: " << info.m_allTokensUsed
<< ", m_exactMatch: " << info.m_exactMatch
<< ", m_isCommonMatchOnly: " << info.m_isCommonMatchOnly
<< " }";
return os.str();
}
} // namespace search