Vowpal Wabbit
Public Member Functions | Private Attributes | List of all members
LEARNER::multi_instance_context Class Reference

Public Member Functions

 multi_instance_context (const std::vector< vw *> &all)
 
vwget_master () const
 
template<class T , void(*)(T &, vw &) process_impl>
void process (T &ec)
 

Private Attributes

std::vector< vw * > _all
 

Detailed Description

Definition at line 119 of file learner.cc.

Constructor & Destructor Documentation

◆ multi_instance_context()

LEARNER::multi_instance_context::multi_instance_context ( const std::vector< vw *> &  all)
inline

Definition at line 122 of file learner.cc.

122 : _all(all) {}
std::vector< vw * > _all
Definition: learner.cc:134

Member Function Documentation

◆ get_master()

vw& LEARNER::multi_instance_context::get_master ( ) const
inline

Definition at line 124 of file learner.cc.

Referenced by LEARNER::generic_driver().

124 { return *_all.front(); }
std::vector< vw * > _all
Definition: learner.cc:134

◆ process()

template<class T , void(*)(T &, vw &) process_impl>
void LEARNER::multi_instance_context::process ( T &  ec)
inline

Definition at line 127 of file learner.cc.

128  {
129  // start with last as the first instance will free the example as it is the owner
130  for (auto it = _all.rbegin(); it != _all.rend(); ++it) process_impl(ec, **it);
131  }
std::vector< vw * > _all
Definition: learner.cc:134

Member Data Documentation

◆ _all

std::vector<vw*> LEARNER::multi_instance_context::_all
private

Definition at line 134 of file learner.cc.


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