Vowpal Wabbit
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
VW::features Class Reference

the core definition of a set of features. More...

#include <feature_group.h>

Public Types

using iterator = details::features_iterator< feature_value, feature_index >
 
using const_iterator = details::features_iterator< const feature_value, const feature_index >
 
using audit_iterator = details::audit_features_iterator< feature_value, feature_index, VW::audit_strings >
 
using const_audit_iterator = details::audit_features_iterator< const feature_value, const feature_index, const VW::audit_strings >
 
using extent_iterator = details::ns_extent_iterator< features, audit_iterator, std::vector< VW::namespace_extent >::iterator >
 
using const_extent_iterator = details::ns_extent_iterator< const features, const_audit_iterator, std::vector< VW::namespace_extent >::const_iterator >
 

Public Member Functions

 features ()=default
 
 ~features ()=default
 
 features (const features &)=default
 
featuresoperator= (const features &)=default
 
 features (features &&other)=default
 
featuresoperator= (features &&other)=default
 
size_t size () const
 
bool empty () const
 
bool nonempty () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
VW::generic_range< audit_iteratoraudit_range ()
 
VW::generic_range< const_audit_iteratoraudit_range () const
 
audit_iterator audit_begin ()
 
const_audit_iterator audit_begin () const
 
audit_iterator audit_end ()
 
const_audit_iterator audit_end () const
 
const_audit_iterator audit_cbegin () const
 
const_audit_iterator audit_cend () const
 
extent_iterator hash_extents_begin (uint64_t hash)
 
const_extent_iterator hash_extents_begin (uint64_t hash) const
 
extent_iterator hash_extents_end (uint64_t hash)
 
const_extent_iterator hash_extents_end (uint64_t hash) const
 
template<typename FuncT >
void foreach_feature_for_hash (uint64_t hash, const FuncT &func) const
 
void clear ()
 
void truncate_to (const audit_iterator &pos, float sum_feat_sq_of_removed_section)
 
void truncate_to (const iterator &pos, float sum_feat_sq_of_removed_section)
 
void truncate_to (size_t i, float sum_feat_sq_of_removed_section)
 
void truncate_to (const audit_iterator &pos)
 
void truncate_to (const iterator &pos)
 
void truncate_to (size_t i)
 
void concat (const features &other)
 
void push_back (feature_value v, feature_index i)
 
void push_back (feature_value v, feature_index i, uint64_t ns_hash)
 
bool sort (uint64_t parse_mask)
 
void start_ns_extent (uint64_t hash)
 
void end_ns_extent ()
 
bool validate_extents ()
 

Public Attributes

VW::v_array< feature_valuevalues
 
VW::v_array< feature_indexindices
 
std::vector< VW::audit_stringsspace_names
 
std::vector< VW::namespace_extentnamespace_extents
 
float sum_feat_sq = 0.f
 

Detailed Description

the core definition of a set of features.

Member Typedef Documentation

◆ audit_iterator

◆ const_audit_iterator

◆ const_extent_iterator

◆ const_iterator

◆ extent_iterator

◆ iterator

Constructor & Destructor Documentation

◆ features() [1/3]

VW::features::features ( )
default

◆ ~features()

VW::features::~features ( )
default

◆ features() [2/3]

VW::features::features ( const features )
default

◆ features() [3/3]

VW::features::features ( features &&  other)
default

Member Function Documentation

◆ audit_begin() [1/2]

audit_iterator VW::features::audit_begin ( )
inline

◆ audit_begin() [2/2]

const_audit_iterator VW::features::audit_begin ( ) const
inline

◆ audit_cbegin()

const_audit_iterator VW::features::audit_cbegin ( ) const
inline

◆ audit_cend()

const_audit_iterator VW::features::audit_cend ( ) const
inline

◆ audit_end() [1/2]

audit_iterator VW::features::audit_end ( )
inline

◆ audit_end() [2/2]

const_audit_iterator VW::features::audit_end ( ) const
inline

◆ audit_range() [1/2]

VW::generic_range< audit_iterator > VW::features::audit_range ( )
inline

◆ audit_range() [2/2]

VW::generic_range< const_audit_iterator > VW::features::audit_range ( ) const
inline

◆ begin() [1/2]

iterator VW::features::begin ( )
inline

◆ begin() [2/2]

const_iterator VW::features::begin ( ) const
inline

◆ cbegin()

const_iterator VW::features::cbegin ( ) const
inline

◆ cend()

const_iterator VW::features::cend ( ) const
inline

◆ clear()

void VW::features::clear ( )

◆ concat()

void VW::features::concat ( const features other)

◆ empty()

bool VW::features::empty ( ) const
inline

◆ end() [1/2]

iterator VW::features::end ( )
inline

◆ end() [2/2]

const_iterator VW::features::end ( ) const
inline

◆ end_ns_extent()

void VW::features::end_ns_extent ( )

◆ foreach_feature_for_hash()

template<typename FuncT >
void VW::features::foreach_feature_for_hash ( uint64_t  hash,
const FuncT &  func 
) const
inline

◆ hash_extents_begin() [1/2]

extent_iterator VW::features::hash_extents_begin ( uint64_t  hash)
inline

◆ hash_extents_begin() [2/2]

const_extent_iterator VW::features::hash_extents_begin ( uint64_t  hash) const
inline

◆ hash_extents_end() [1/2]

extent_iterator VW::features::hash_extents_end ( uint64_t  hash)
inline

◆ hash_extents_end() [2/2]

const_extent_iterator VW::features::hash_extents_end ( uint64_t  hash) const
inline

◆ nonempty()

bool VW::features::nonempty ( ) const
inline

◆ operator=() [1/2]

features & VW::features::operator= ( const features )
default

◆ operator=() [2/2]

features & VW::features::operator= ( features &&  other)
default

◆ push_back() [1/2]

void VW::features::push_back ( feature_value  v,
feature_index  i 
)

◆ push_back() [2/2]

void VW::features::push_back ( feature_value  v,
feature_index  i,
uint64_t  ns_hash 
)

◆ size()

size_t VW::features::size ( ) const
inline

◆ sort()

bool VW::features::sort ( uint64_t  parse_mask)

◆ start_ns_extent()

void VW::features::start_ns_extent ( uint64_t  hash)

◆ truncate_to() [1/6]

void VW::features::truncate_to ( const audit_iterator pos)

◆ truncate_to() [2/6]

void VW::features::truncate_to ( const audit_iterator pos,
float  sum_feat_sq_of_removed_section 
)

◆ truncate_to() [3/6]

void VW::features::truncate_to ( const iterator pos)

◆ truncate_to() [4/6]

void VW::features::truncate_to ( const iterator pos,
float  sum_feat_sq_of_removed_section 
)

◆ truncate_to() [5/6]

void VW::features::truncate_to ( size_t  i)

◆ truncate_to() [6/6]

void VW::features::truncate_to ( size_t  i,
float  sum_feat_sq_of_removed_section 
)

◆ validate_extents()

bool VW::features::validate_extents ( )
inline

Member Data Documentation

◆ indices

VW::v_array<feature_index> VW::features::indices

◆ namespace_extents

std::vector<VW::namespace_extent> VW::features::namespace_extents

◆ space_names

std::vector<VW::audit_strings> VW::features::space_names

◆ sum_feat_sq

float VW::features::sum_feat_sq = 0.f

◆ values

VW::v_array<feature_value> VW::features::values

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