Vowpal Wabbit
Public Member Functions | List of all members
safe_example_predict Class Reference

#include <example_predict.h>

Inheritance diagram for safe_example_predict:
example_predict

Public Member Functions

 safe_example_predict ()
 
 ~safe_example_predict ()
 
void clear ()
 
- Public Member Functions inherited from example_predict
iterator begin ()
 
iterator end ()
 

Additional Inherited Members

- Public Attributes inherited from example_predict
v_array< namespace_indexindices
 
std::array< features, NUM_NAMESPACESfeature_space
 
uint64_t ft_offset
 
std::vector< std::string > * interactions
 

Detailed Description

Definition at line 53 of file example_predict.h.

Constructor & Destructor Documentation

◆ safe_example_predict()

safe_example_predict::safe_example_predict ( )

Definition at line 9 of file example_predict.cc.

References example_predict::ft_offset, and example_predict::indices.

10 {
11  indices = v_init<namespace_index>();
12  ft_offset = 0;
13  // feature_space is initialized through constructors
14 }
v_array< namespace_index > indices

◆ ~safe_example_predict()

safe_example_predict::~safe_example_predict ( )

Definition at line 16 of file example_predict.cc.

References v_array< T >::delete_v(), example_predict::feature_space, and example_predict::indices.

17 {
18  indices.delete_v();
19  for (size_t i = 0; i < UINT8_MAX; i++) feature_space[i].delete_v();
20 }
v_array< namespace_index > indices
std::array< features, NUM_NAMESPACES > feature_space
void delete_v()
Definition: v_array.h:98

Member Function Documentation

◆ clear()

void safe_example_predict::clear ( )

Definition at line 22 of file example_predict.cc.

References example_predict::feature_space, and example_predict::indices.

Referenced by generate_cb_data_5().

23 {
24  for (auto ns : indices) feature_space[ns].clear();
25  indices.clear();
26 }
v_array< namespace_index > indices
std::array< features, NUM_NAMESPACES > feature_space

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