Akumuli
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Classes | Public Member Functions | Public Attributes | List of all members
Akumuli::QP::SpaceSaver< weighted > Struct Template Reference
Inheritance diagram for Akumuli::QP::SpaceSaver< weighted >:
Akumuli::QP::Node

Classes

struct  Item
 

Public Member Functions

 SpaceSaver (double error, double portion, std::shared_ptr< Node > next)
 
 SpaceSaver (boost::property_tree::ptree const &ptree, std::shared_ptr< Node > next)
 
bool count ()
 
virtual void complete ()
 Complete adding values.
 
virtual bool put (const aku_Sample &sample)
 
virtual void set_error (aku_Status status)
 
virtual int get_requirements () const
 

Public Attributes

std::shared_ptr< Nodenext_
 
std::unordered_map
< aku_ParamId, Item
counters_
 
double N
 Capacity.
 
size_t M
 
double P
 

Additional Inherited Members

- Public Types inherited from Akumuli::QP::Node
enum  QueryFlags { EMPTY = 0, GROUP_BY_REQUIRED = 1, TERMINAL = 2 }
 

Constructor & Destructor Documentation

template<bool weighted>
Akumuli::QP::SpaceSaver< weighted >::SpaceSaver ( double  error,
double  portion,
std::shared_ptr< Node next 
)
inline

C-tor.

Parameters
erroris a allowed error value between 0 and 1
portionis a frequency (or weight) portion that we interested in Object should report all items wich frequencies is greater then (portion-error)*N where N is a number of elements (or total weight of all items in a stream).

Member Function Documentation

template<bool weighted>
virtual int Akumuli::QP::SpaceSaver< weighted >::get_requirements ( ) const
inlinevirtual

This method returns set of flags that describes its functioning.

Implements Akumuli::QP::Node.

template<bool weighted>
virtual bool Akumuli::QP::SpaceSaver< weighted >::put ( const aku_Sample &  sample)
inlinevirtual

Process value, return false to interrupt process. Empty sample can be sent to flush all updates.

Implements Akumuli::QP::Node.


The documentation for this struct was generated from the following file: