Vowpal Wabbit
Public Member Functions | Public Attributes | List of all members
Namespace< audit > Struct Template Reference

#include <parse_example_json.h>

Public Member Functions

void AddFeature (feature_value v, feature_index i, const char *feature_name)
 
void AddFeature (vw *all, const char *str)
 

Public Attributes

char feature_group
 
feature_index namespace_hash
 
featuresftrs
 
size_t feature_count
 
BaseState< audit > * return_state
 
const char * name
 

Detailed Description

template<bool audit>
struct Namespace< audit >

Definition at line 54 of file parse_example_json.h.

Member Function Documentation

◆ AddFeature() [1/2]

template<bool audit>
void Namespace< audit >::AddFeature ( feature_value  v,
feature_index  i,
const char *  feature_name 
)
inline

Definition at line 63 of file parse_example_json.h.

References v_array< T >::push_back(), features::push_back(), and features::space_names.

64  {
65  // filter out 0-values
66  if (v == 0)
67  return;
68 
69  ftrs->push_back(v, i);
70  feature_count++;
71 
72  if (audit)
74  }
void push_back(feature_value v, feature_index i)
std::shared_ptr< audit_strings > audit_strings_ptr
Definition: feature_group.h:23
features * ftrs
size_t feature_count
void push_back(const T &new_ele)
Definition: v_array.h:107
v_array< audit_strings_ptr > space_names
const char * name
std::pair< std::string, std::string > audit_strings
Definition: feature_group.h:22

◆ AddFeature() [2/2]

template<bool audit>
void Namespace< audit >::AddFeature ( vw all,
const char *  str 
)
inline

Definition at line 76 of file parse_example_json.h.

References VW::hash_feature(), v_array< T >::push_back(), features::push_back(), and features::space_names.

77  {
79  feature_count++;
80 
81  if (audit)
83  }
void push_back(feature_value v, feature_index i)
std::shared_ptr< audit_strings > audit_strings_ptr
Definition: feature_group.h:23
features * ftrs
size_t feature_count
feature_index namespace_hash
void push_back(const T &new_ele)
Definition: v_array.h:107
v_array< audit_strings_ptr > space_names
uint64_t hash_feature(vw &all, const std::string &s, uint64_t u)
Definition: vw.h:153
const char * name
std::pair< std::string, std::string > audit_strings
Definition: feature_group.h:22

Member Data Documentation

◆ feature_count

template<bool audit>
size_t Namespace< audit >::feature_count

Definition at line 59 of file parse_example_json.h.

Referenced by Context< audit >::PushNamespace().

◆ feature_group

template<bool audit>
char Namespace< audit >::feature_group

Definition at line 56 of file parse_example_json.h.

Referenced by Context< audit >::PushNamespace().

◆ ftrs

template<bool audit>
features* Namespace< audit >::ftrs

Definition at line 58 of file parse_example_json.h.

Referenced by Context< audit >::PushNamespace().

◆ name

template<bool audit>
const char* Namespace< audit >::name

Definition at line 61 of file parse_example_json.h.

Referenced by Context< audit >::PushNamespace().

◆ namespace_hash

template<bool audit>
feature_index Namespace< audit >::namespace_hash

Definition at line 57 of file parse_example_json.h.

Referenced by Context< audit >::PushNamespace().

◆ return_state

template<bool audit>
BaseState<audit>* Namespace< audit >::return_state

Definition at line 60 of file parse_example_json.h.

Referenced by Context< audit >::PushNamespace().


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