Vowpal Wabbit
|
#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 () |
Private Attributes | |
size_t | beam_size |
size_t | count |
float | pruning_coefficient |
float | worst_cost |
float | best_cost |
float | prune_if_gt |
T * | best_cost_data |
bool | do_kbest |
v_array< beam_element< T > > | A |
bool(* | is_equivalent )(T *, T *) |
|
inline |
Definition at line 97 of file beam.h.
References BEAM_CONSTANT_SIZE, and v_array< T >::resize().
|
inline |
Definition at line 307 of file beam.h.
References v_array< T >::delete_v(), and v_array< T >::size().
|
inline |
|
inline |
Definition at line 265 of file beam.h.
References v_array< T >::begin(), Beam::compare_on_cost(), v_array< T >::end(), f, and v_array< T >::size().
|
inline |
Definition at line 228 of file beam.h.
References v_array< T >::begin(), Beam::compare_on_hash_then_cost(), Beam::beam_element< T >::data, Beam::beam_element< T >::hash, and v_array< T >::size().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 186 of file beam.h.
References Beam::beam_element< T >::active, v_array< T >::begin(), and v_array< T >::end().
|
inline |
Definition at line 116 of file beam.h.
References Beam::beam_element< T >::active, BEAM_CONSTANT_SIZE, Beam::beam_element< T >::cost, Beam::beam_element< T >::data, f, Beam::beam_element< T >::hash, and v_array< T >::push_back().
|
inline |
|
inline |
|
inline |
Definition at line 195 of file beam.h.
References Beam::beam_element< T >::active, v_array< T >::begin(), Beam::beam_element< T >::cost, v_array< T >::end(), and f.
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |