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: 8b309725574806986c515e1cd4f3b2b282574a4c (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::ConstIter begin, Results::ConstIter end);
  bool IsHotelResults() const;

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