JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
HistogramAggregator.h
Go to the documentation of this file.
1 #ifndef JODA_HISTOGRAMAGGREGATOR_H
2 #define JODA_HISTOGRAMAGGREGATOR_H
3 
4 #include <boost/histogram.hpp>
5 
6 #include "IAggregator.h"
7 
8 namespace joda::query {
10  public:
11  HistogramAggregator(const std::string &toPointer,
12  std::vector<std::unique_ptr<IValueProvider>> &&params);
13  void merge(IAggregator *other) override;
14  RJValue terminate(RJMemoryPoolAlloc &alloc) override;
15  std::unique_ptr<IAggregator> duplicate() const override;
16  void accumulate(const RapidJsonDocument &json,
17  RJMemoryPoolAlloc &alloc) override;
18  const std::string getName() const override;
19 
20  static constexpr auto getName_() { return "HISTOGRAM"; }
21 
22  protected:
23  boost::histogram::histogram<std::tuple<boost::histogram::axis::regular<>>>
25 };
26 } // namespace joda::query
27 
28 #endif // JODA_HISTOGRAMAGGREGATOR_H
rapidjson::MemoryPoolAllocator< RJBaseAlloc > RJMemoryPoolAlloc
Definition: RJFwd.h:26
rapidjson::GenericValue< RJChar, RJMemoryPoolAlloc > RJValue
Definition: RJFwd.h:29
Definition: RapidJsonDocument.h:22
Definition: HistogramAggregator.h:9
boost::histogram::histogram< std::tuple< boost::histogram::axis::regular<> > > hist
Definition: HistogramAggregator.h:24
std::unique_ptr< IAggregator > duplicate() const override
Definition: HistogramAggregator.cpp:37
static constexpr auto getName_()
Definition: HistogramAggregator.h:20
HistogramAggregator(const std::string &toPointer, std::vector< std::unique_ptr< IValueProvider >> &&params)
Definition: HistogramAggregator.cpp:42
RJValue terminate(RJMemoryPoolAlloc &alloc) override
Definition: HistogramAggregator.cpp:7
void merge(IAggregator *other) override
Definition: HistogramAggregator.cpp:89
void accumulate(const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) override
Definition: HistogramAggregator.cpp:65
const std::string getName() const override
Definition: HistogramAggregator.cpp:85
Definition: IAggregator.h:25
std::vector< std::unique_ptr< IValueProvider > > params
Definition: IAggregator.h:124
std::string toPointer
Definition: IAggregator.h:120
Definition: AttributeStatAggregator.h:12