Rosetta
|
#include <heap.hh>
Public Member Functions | |
heap (int max_items) | |
Create a heap with this number of items. More... | |
virtual | ~heap () |
void | heap_insert (int val, float coval, bool &err) |
Inserts a value into the heap that is sorted by coval. More... | |
void | heap_extract (int &val, float &coval, bool &err) |
Extracts the val,coval pair with the lowest coval from the heap. This modifies the heap, and the returned values are put into the arguments val and coval. More... | |
void | heap_replace (int val, float coval) |
void | reset_coval (int val, float coval) |
float | heap_head () const |
returns the smallest covalue stored in the heap. More... | |
float | coval (int index) const |
int | val (int index) const |
int | size () const |
int | capacity () const |
![]() | |
ReferenceCount () | |
Default constructor. More... | |
virtual | ~ReferenceCount () |
Private Member Functions | |
void | heap_init (int max_items) |
sets up an empty heap and stores the dimensioned size More... | |
void | heap_down (int index_in) |
void | heap_up (int index_in) |
int & | heap_size () |
int & | heap_capacity () |
void | decrease_coval (int index, float coval) |
void | increase_coval (int index, float coval) |
int | index_for_val (int val) |
Private Attributes | |
utility::vector0< int > | heap_ |
utility::vector0< float > | coheap_ |
Additional Inherited Members | |
![]() | |
typedef platform::Size | Size |
typedef platform::Size | size_type |
|
inline |
Create a heap with this number of items.
Definition at line 37 of file heap.hh.
References coheap_, heap_, and heap_init().
Definition at line 179 of file heap.cc.
References coheap_, and ObjexxFCL::index().
Referenced by decrease_coval(), heap_insert(), heap_replace(), and increase_coval().
Definition at line 298 of file heap.cc.
References coheap_, coval(), heap_up(), and ObjexxFCL::index().
Referenced by reset_coval().
|
private |
Definition at line 291 of file heap.cc.
References heap_.
Referenced by heap_init(), and heap_insert().
|
private |
Definition at line 206 of file heap.cc.
References coheap_, heap_, and heap_size().
Referenced by heap_extract(), heap_replace(), and increase_coval().
Extracts the val,coval pair with the lowest coval from the heap. This modifies the heap, and the returned values are put into the arguments val and coval.
modifes heap and last_val return val and err.
Definition at line 73 of file heap.cc.
References coheap_, heap_, heap_down(), and heap_size().
float utility::heap::heap_head | ( | ) | const |
|
private |
sets up an empty heap and stores the dimensioned size
Definition at line 59 of file heap.cc.
References heap_capacity(), and heap_size().
Referenced by heap().
Inserts a value into the heap that is sorted by coval.
modifies heap and last_dummy, inserts val, returns err requires heap_max to be previously set via heap_init
Definition at line 115 of file heap.cc.
References coheap_, coval(), heap_, heap_capacity(), heap_replace(), heap_size(), heap_up(), and val().
Definition at line 142 of file heap.cc.
References coheap_, coval(), heap_, heap_down(), and val().
Referenced by heap_insert().
|
private |
Definition at line 285 of file heap.cc.
References heap_.
Referenced by heap_down(), heap_extract(), heap_init(), heap_insert(), and index_for_val().
|
private |
Definition at line 256 of file heap.cc.
References coheap_, heap_, test.T850_SubClassing::pv, and value.
Referenced by decrease_coval(), and heap_insert().
Definition at line 305 of file heap.cc.
References coheap_, coval(), heap_down(), and ObjexxFCL::index().
Referenced by reset_coval().
Definition at line 312 of file heap.cc.
References heap_, heap_size(), and test.T200_Scoring::ii.
Referenced by reset_coval().
Definition at line 158 of file heap.cc.
References coheap_, decrease_coval(), increase_coval(), ObjexxFCL::index(), and index_for_val().
Definition at line 185 of file heap.cc.
References heap_, and ObjexxFCL::index().
Referenced by heap_insert(), and heap_replace().
|
private |
Definition at line 105 of file heap.hh.
Referenced by coval(), decrease_coval(), heap(), heap_down(), heap_extract(), heap_head(), heap_insert(), heap_replace(), heap_up(), increase_coval(), and reset_coval().
|
private |
Definition at line 104 of file heap.hh.
Referenced by capacity(), heap(), heap_capacity(), heap_down(), heap_extract(), heap_insert(), heap_replace(), heap_size(), heap_up(), index_for_val(), size(), and val().