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

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

#include "search/result.hpp"

namespace search
{
// A binary classifier that can be used in conjunction with search
// engine to decide whether the majority of results are hotels or not.
//
// *NOTE* This class is NOT thread safe.
class HotelsClassifier
{
public:
  static bool IsHotelResults(Results const & results);

  void Add(Results::Iter begin, Results::Iter end);
  bool IsHotelResults() const;

private:
  uint64_t m_numHotels = 0;
  uint64_t m_numResults = 0;
};
}  // namespace search