Vowpal Wabbit
Public Member Functions | List of all members
Beam::beam< T > Class Template Reference

#include <beam.h>

Public Member Functions

 beam (size_t beam_size, float prune_coeff=FLT_MAX, bool(*test_equiv)(T *, T *)=nullptr, bool kbest=false)
 
bool might_insert (float cost)
 
bool insert (T *data, float cost, uint32_t hash)
 
beam_element< T > * get_best_item ()
 
beam_element< T > * pop_best_item ()
 
void do_recombination ()
 
void compact (void(*free_data)(T *)=nullptr)
 
void maybe_compact (void(*free_data)(T *)=nullptr)
 
void erase (void(*free_data)(T *)=nullptr)
 
 ~beam ()
 
beam_element< T > * begin ()
 
beam_element< T > * end ()
 
size_t size ()
 
bool empty ()
 
size_t get_beam_size ()
 

Constructor & Destructor Documentation

template<class T >
Beam::beam< T >::beam ( size_t  beam_size,
float  prune_coeff = FLT_MAX,
bool(*)(T *, T *)  test_equiv = nullptr,
bool  kbest = false 
)
inline
template<class T >
Beam::beam< T >::~beam ( )
inline

Member Function Documentation

template<class T >
beam_element<T>* Beam::beam< T >::begin ( )
inline
template<class T >
void Beam::beam< T >::compact ( void(*)(T *)  free_data = nullptr)
inline
template<class T >
void Beam::beam< T >::do_recombination ( )
inline
template<class T >
bool Beam::beam< T >::empty ( )
inline
template<class T >
beam_element<T>* Beam::beam< T >::end ( )
inline
template<class T >
void Beam::beam< T >::erase ( void(*)(T *)  free_data = nullptr)
inline
template<class T >
size_t Beam::beam< T >::get_beam_size ( )
inline
template<class T >
beam_element<T>* Beam::beam< T >::get_best_item ( )
inline
template<class T >
bool Beam::beam< T >::insert ( T *  data,
float  cost,
uint32_t  hash 
)
inline
template<class T >
void Beam::beam< T >::maybe_compact ( void(*)(T *)  free_data = nullptr)
inline
template<class T >
bool Beam::beam< T >::might_insert ( float  cost)
inline
template<class T >
beam_element<T>* Beam::beam< T >::pop_best_item ( )
inline
template<class T >
size_t Beam::beam< T >::size ( )
inline

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