82 push (std::vector<T>& data) = 0;
102 template <
typename T>
118 push (std::vector<T>& data)
override;
122 std::vector<T> data_;
123 mutable std::mutex data_mutex_;
142 template <
typename T>
170 push (std::vector<T>& data)
override;
180 static int compare (T a, T b);
182 const unsigned char window_size_;
183 const unsigned char midpoint_;
187 std::vector<std::vector<T> > data_;
190 unsigned char data_current_idx_;
194 std::vector<std::vector<unsigned char> > data_argsort_indices_;
197 std::vector<unsigned char> data_invalid_count_;
199 mutable std::mutex data_mutex_;
218 template <
typename T>
246 push (std::vector<T>& data)
override;
250 const unsigned char window_size_;
254 std::vector<std::vector<T> > data_;
257 unsigned char data_current_idx_;
260 std::vector<T> data_sum_;
263 std::vector<unsigned char> data_invalid_count_;
265 mutable std::mutex data_mutex_;
275 #include <pcl/io/impl/buffers.hpp>
A buffer that computes running window average of the data inserted.
void push(std::vector< T > &data) override
Insert a new chunk of data into the buffer.
AverageBuffer(std::size_t size, unsigned char window_size)
Construct a buffer of given size with given running window size.
~AverageBuffer() override
T operator[](std::size_t idx) const override
Access an element at a given index.
An abstract base class for fixed-size data buffers.
virtual void push(std::vector< T > &data)=0
Insert a new chunk of data into the buffer.
std::size_t size() const
Get the size of the buffer.
virtual T operator[](std::size_t idx) const =0
Access an element at a given index.
A simple buffer that only stores data.
void push(std::vector< T > &data) override
Insert a new chunk of data into the buffer.
T operator[](std::size_t idx) const override
Access an element at a given index.
SingleBuffer(std::size_t size)
Construct a buffer of given size.