jubatus_core  0.1.2
Jubatus: Online machine learning framework for distributed environment
Public Member Functions | Private Attributes | List of all members
jubatus::core::burst::burst::impl_::aggregate_helper_ Class Reference
Collaboration diagram for jubatus::core::burst::burst::impl_::aggregate_helper_:
Collaboration graph

Public Member Functions

bool add_document (int d, int r, double pos) const
 
 aggregate_helper_ (const burst_options &options, const storage_ &s)
 
void calculate_result (const burst_options &options) const
 
const shared_ptr< aggregator > & get_aggregator () const
 
diff_t::impl_::entry_t get_diff () const
 
const keyword_paramsget_params () const
 
const shared_ptr< result_storage > & get_storage () const
 
bool is_to_be_removed () const
 
void set_processed ()
 
void set_unprocessed ()
 
void tick_removal_count ()
 

Private Attributes

shared_ptr< aggregatora_
 
keyword_params params_
 
int removal_count_
 
shared_ptr< result_storages_
 

Detailed Description

Definition at line 102 of file burst.cpp.

Constructor & Destructor Documentation

jubatus::core::burst::burst::impl_::aggregate_helper_::aggregate_helper_ ( const burst_options options,
const storage_ s 
)
inline

Definition at line 104 of file burst.cpp.

106  : a_(new aggregator(options.window_batch_size,
107  options.batch_interval,
108  options.result_window_rotate_size)),
109  s_(s.get_storage()),
110  params_(s.get_params()),
111  removal_count_(-1) {
112  }

Member Function Documentation

bool jubatus::core::burst::burst::impl_::aggregate_helper_::add_document ( int  d,
int  r,
double  pos 
) const
inline

Definition at line 114 of file burst.cpp.

References a_.

Referenced by jubatus::core::burst::burst::impl_::add_document().

114  {
115  return a_->add_document(d, r, pos);
116  }

Here is the caller graph for this function:

void jubatus::core::burst::burst::impl_::aggregate_helper_::calculate_result ( const burst_options options) const
inline
const shared_ptr<aggregator>& jubatus::core::burst::burst::impl_::aggregate_helper_::get_aggregator ( ) const
inline

Definition at line 133 of file burst.cpp.

References a_.

Referenced by jubatus::core::burst::burst::impl_::unpack_impl_().

133  {
134  return a_;
135  }

Here is the caller graph for this function:

diff_t::impl_::entry_t jubatus::core::burst::burst::impl_::aggregate_helper_::get_diff ( ) const
inline

Definition at line 126 of file burst.cpp.

References jubatus::core::burst::burst::diff_t::impl_::entry_t::params, params_, jubatus::core::burst::burst::diff_t::impl_::entry_t::results, and s_.

126  {
127  diff_t::impl_::entry_t entry;
128  entry.params = params_;
129  entry.results = s_->get_diff();
130  return entry;
131  }
const keyword_params& jubatus::core::burst::burst::impl_::aggregate_helper_::get_params ( ) const
inline

Definition at line 141 of file burst.cpp.

References params_.

141  {
142  return params_;
143  }
const shared_ptr<result_storage>& jubatus::core::burst::burst::impl_::aggregate_helper_::get_storage ( ) const
inline

Definition at line 137 of file burst.cpp.

References s_.

137  {
138  return s_;
139  }
bool jubatus::core::burst::burst::impl_::aggregate_helper_::is_to_be_removed ( ) const
inline

Definition at line 161 of file burst.cpp.

References removal_count_.

161  {
162  return removal_count_ == 0;
163  }
void jubatus::core::burst::burst::impl_::aggregate_helper_::set_processed ( )
inline

Definition at line 151 of file burst.cpp.

References removal_count_.

void jubatus::core::burst::burst::impl_::aggregate_helper_::set_unprocessed ( )
inline
void jubatus::core::burst::burst::impl_::aggregate_helper_::tick_removal_count ( )
inline

Definition at line 155 of file burst.cpp.

References removal_count_.

155  {
156  if (removal_count_ > 0) {
157  --removal_count_;
158  }
159  }

Member Data Documentation

shared_ptr<aggregator> jubatus::core::burst::burst::impl_::aggregate_helper_::a_
private

Definition at line 166 of file burst.cpp.

Referenced by add_document(), calculate_result(), and get_aggregator().

keyword_params jubatus::core::burst::burst::impl_::aggregate_helper_::params_
private

Definition at line 168 of file burst.cpp.

Referenced by calculate_result(), get_diff(), and get_params().

int jubatus::core::burst::burst::impl_::aggregate_helper_::removal_count_
private

Definition at line 169 of file burst.cpp.

Referenced by is_to_be_removed(), set_processed(), set_unprocessed(), and tick_removal_count().

shared_ptr<result_storage> jubatus::core::burst::burst::impl_::aggregate_helper_::s_
private

Definition at line 167 of file burst.cpp.

Referenced by calculate_result(), get_diff(), and get_storage().


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