Akumuli
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
randomsamplingnode.h
1 #pragma once
2 
3 #include <memory>
4 #include <vector>
5 
6 #include "../queryprocessor_framework.h"
7 #include "../util.h"
8 
9 namespace Akumuli {
10 namespace QP {
11 
12 struct RandomSamplingNode : std::enable_shared_from_this<RandomSamplingNode>, Node {
13  const uint32_t buffer_size_;
14  std::vector<aku_Sample> samples_;
15  Rand random_;
16  std::shared_ptr<Node> next_;
17 
18  RandomSamplingNode(uint32_t buffer_size, std::shared_ptr<Node> next);
19 
20  RandomSamplingNode(boost::property_tree::ptree const& ptree, std::shared_ptr<Node> next);
21 
22  bool flush();
23 
24  virtual void complete();
25 
26  virtual bool put(const aku_Sample& sample);
27 
28  virtual void set_error(aku_Status status);
29 
30  virtual int get_requirements() const;
31 };
32 }
33 } // namespace
virtual void complete()
Complete adding values.
Definition: randomsamplingnode.cpp:46
virtual int get_requirements() const
Definition: randomsamplingnode.cpp:24
Definition: util.h:154
Definition: queryprocessor_framework.h:28
Definition: randomsamplingnode.h:12
virtual bool put(const aku_Sample &sample)
Definition: randomsamplingnode.cpp:51