JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Member Functions | Static Public Member Functions | Protected Attributes
joda::query::HistogramAggregator Class Reference

#include <HistogramAggregator.h>

Inheritance diagram for joda::query::HistogramAggregator:
[legend]
Collaboration diagram for joda::query::HistogramAggregator:
[legend]

Public Member Functions

 HistogramAggregator (const std::string &toPointer, std::vector< std::unique_ptr< IValueProvider >> &&params)
 
void merge (IAggregator *other) override
 
RJValue terminate (RJMemoryPoolAlloc &alloc) override
 
std::unique_ptr< IAggregatorduplicate () const override
 
void accumulate (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) override
 
const std::string getName () const override
 
- Public Member Functions inherited from joda::query::IAggregator
 IAggregator (const std::string &toPointer, std::vector< std::unique_ptr< IValueProvider >> &&params)
 
 IAggregator (IAggregator const &)=delete
 
void operator= (IAggregator const &x)=delete
 
virtual ~IAggregator ()=default
 
virtual const std::string & getDestPointer () const
 
virtual std::vector< std::string > getAttributes () const
 
std::string getParameterStringRepresentation () const
 
virtual std::string toString () const
 

Static Public Member Functions

static constexpr auto getName_ ()
 

Protected Attributes

boost::histogram::histogram< std::tuple< boost::histogram::axis::regular<> > > hist
 
- Protected Attributes inherited from joda::query::IAggregator
std::string toPointer
 
std::vector< std::unique_ptr< IValueProvider > > params
 

Additional Inherited Members

- Protected Member Functions inherited from joda::query::IAggregator
void checkParamSize (unsigned int expected)
 
void checkMinParamSize (unsigned int expected)
 
void checkParamType (unsigned int i, IValueType expected)
 
void checkOptionalParamType (unsigned int i, IValueType expected)
 
std::vector< std::unique_ptr< IValueProvider > > duplicateParameters () const
 

Constructor & Destructor Documentation

◆ HistogramAggregator()

joda::query::HistogramAggregator::HistogramAggregator ( const std::string &  toPointer,
std::vector< std::unique_ptr< IValueProvider >> &&  params 
)
Here is the call graph for this function:

Member Function Documentation

◆ accumulate()

void joda::query::HistogramAggregator::accumulate ( const RapidJsonDocument json,
RJMemoryPoolAlloc alloc 
)
overridevirtual

Accumulates another value. This function is called for every value once

Parameters
jsonThe Rapidjsondocument to retrieve values from. (Or an empty RapidJsonDocument for const values)
allocA MemoryPoolAllocator to create the values with

Implements joda::query::IAggregator.

◆ duplicate()

std::unique_ptr< joda::query::IAggregator > joda::query::HistogramAggregator::duplicate ( ) const
overridevirtual

Duplicates the Aggregator

Returns
A new Instance of the given Aggregator

Implements joda::query::IAggregator.

◆ getName()

const std::string joda::query::HistogramAggregator::getName ( ) const
overridevirtual

Returns the name of the Aggregator

Returns
Name of Aggregator

Implements joda::query::IAggregator.

◆ getName_()

static constexpr auto joda::query::HistogramAggregator::getName_ ( )
inlinestaticconstexpr

◆ merge()

void joda::query::HistogramAggregator::merge ( IAggregator other)
overridevirtual

Merges the given instance with another.

Parameters
otherOther instance to be merged. Has to be of same class!

Implements joda::query::IAggregator.

◆ terminate()

RJValue joda::query::HistogramAggregator::terminate ( RJMemoryPoolAlloc alloc)
overridevirtual

Terminates the aggregation and collects the values

Returns
Collected values (GroupKey,Value)

Implements joda::query::IAggregator.

Field Documentation

◆ hist

boost::histogram::histogram<std::tuple<boost::histogram::axis::regular<> > > joda::query::HistogramAggregator::hist
protected

The documentation for this class was generated from the following files: