Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
27
libs/search/pre_ranking_info.cpp
Normal file
27
libs/search/pre_ranking_info.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue