17 #ifndef JUBATUS_CORE_BURST_WINDOW_INTERSECTION_HPP_
18 #define JUBATUS_CORE_BURST_WINDOW_INTERSECTION_HPP_
25 #include <msgpack.hpp>
26 #include "jubatus/util/lang/shared_ptr.h"
29 #include "../framework/mixable_helper.hpp"
36 double pos0,
double pos1,
double batch_interval) {
37 return std::abs(pos1 - pos0) / batch_interval < 0.01;
43 double batch_interval = 1,
50 template<
class Window>
57 template<
class Window>
84 return std::numeric_limits<int>::min();
117 template<
class W1,
class W2>
126 #endif // JUBATUS_CORE_BURST_WINDOW_INTERSECTION_HPP_
bool position_near(double pos0, double pos1) const
int get_index_(double pos) const
int get_index_for_boundary(double boundary_pos) const
intersection_helper(double start_pos=0, double batch_interval=1, int batch_size=0)
std::pair< int, int > get_intersection(const W1 &w1, const W2 &w2)
bool has_batch_interval_equals_to(double interval1) const
bool window_position_near(double pos0, double pos1, double batch_interval)
std::pair< int, int > get_intersection(const Window &w) const
int adjust_index(int index) const
intersection_helper(const Window &w)