17 #ifndef JUBATUS_CORE_BURST_INPUT_WINDOW_HPP_
18 #define JUBATUS_CORE_BURST_INPUT_WINDOW_HPP_
24 #include <msgpack.hpp>
25 #include "../common/assert.hpp"
26 #include "../common/exception.hpp"
41 if (!(batch_interval > 0)) {
43 "window: batch_interval should be > 0"));
47 basic_window(
double start_pos,
double batch_interval, int32_t batch_size)
49 if (!(batch_interval > 0)) {
51 "window: batch_interval should be > 0"));
53 if (!(batch_size >= 0)) {
55 "window: batch_size should be >= 0"));
65 if (i < 0 || n <= i) {
122 return static_cast<int>(
132 double batch_interval = 1,
133 int32_t batch_size = 0)
134 : base_(start_pos, batch_interval, batch_size) {
173 #endif // JUBATUS_CORE_BURST_INPUT_WINDOW_HPP_
double get_all_interval() const
batch_type & get_batch_by_index(size_t i)
std::vector< batch_type > batches_
bool contains(double pos) const
double get_batch_interval() const
#define JUBATUS_ASSERT(expr)
#define JUBATUS_EXCEPTION(e)
void swap(basic_window &x)
friend void swap(basic_window &x, basic_window &y)
int get_index(double pos) const
void swap(weighted_point &p1, weighted_point &p2)
basic_window(double batch_interval=1)
const batch_type & get_batch_by_index(size_t i) const
const std::vector< batch_type > & get_batches() const
basic_window(double start_pos, double batch_interval, int32_t batch_size)
double get_end_pos() const
int32_t get_batch_size() const
double get_start_pos() const
int get_index_(double pos) const