Rosetta
|
Public Member Functions | |
HeapContainer () | |
default constructor for HeapContainer. Sets max_values to 100. More... | |
HeapContainer (Size const max) | |
constructor. More... | |
Size | max_values () const |
Returns the maximum number of values that this HeapContainer will hold. More... | |
void | max_values (Size new_max) |
Sets the maximum number of values that this HeapContainer will hold. More... | |
void | add_value (T val) |
Add a value to his HeapContainer. If it's greater than any of the values already inside, it will be added to the HeapContainer. Only max_values() values are stored. More... | |
Size | size () const |
Returns the number of values currently in this object. More... | |
T | operator[] (Size idx) |
Access the value at index idx. More... | |
Private Member Functions | |
T | worst () |
void | sort_myself () |
Private Attributes | |
core::Size | max_values_ |
bool | is_sorted_ |
utility::vector1< T > | values_ |
|
inline |
default constructor for HeapContainer. Sets max_values to 100.
|
inline |
constructor.
|
inline |
Add a value to his HeapContainer. If it's greater than any of the values already inside, it will be added to the HeapContainer. Only max_values() values are stored.
References HeapContainer< T, Comparator >::is_sorted_, HeapContainer< T, Comparator >::max_values(), HeapContainer< T, Comparator >::max_values_, HeapContainer< T, Comparator >::sort_myself(), HeapContainer< T, Comparator >::values_, and HeapContainer< T, Comparator >::worst().
|
inline |
Returns the maximum number of values that this HeapContainer will hold.
References HeapContainer< T, Comparator >::max_values_.
Referenced by HeapContainer< T, Comparator >::add_value().
|
inline |
Sets the maximum number of values that this HeapContainer will hold.
References HeapContainer< T, Comparator >::max_values_.
|
inline |
Access the value at index idx.
References kmeans_adaptive_kernel_density_bb_dependent_rotlib::idx, and HeapContainer< T, Comparator >::values_.
|
inline |
Returns the number of values currently in this object.
References HeapContainer< T, Comparator >::values_.
|
inlineprivate |
|
inlineprivate |
References HeapContainer< T, Comparator >::sort_myself(), and HeapContainer< T, Comparator >::values_.
Referenced by HeapContainer< T, Comparator >::add_value().
|
private |
|
private |
|
private |