16 #ifndef INCLUDED_utility_heap_hh
17 #define INCLUDED_utility_heap_hh
42 heap_ .resize( max_items + 2 );
43 coheap_.resize( max_items + 2 );
void heap_replace(int val, float coval)
ReferenceCount base class – dispatch class.
vector0: std::vector with assert-checked bounds
void increase_coval(int index, float coval)
void heap_insert(int val, float coval, bool &err)
Inserts a value into the heap that is sorted by coval.
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...
utility::vector0< float > coheap_
Fstring::size_type index(Fstring const &s, Fstring const &ss)
First Index Position of a Substring in an Fstring.
float heap_head() const
returns the smallest covalue stored in the heap.
Base class for reference-counted polymorphic classes.
forward class definition of class heap
void heap_init(int max_items)
sets up an empty heap and stores the dimensioned size
void heap_down(int index_in)
void decrease_coval(int index, float coval)
int index_for_val(int val)
void reset_coval(int val, float coval)
utility::vector0< int > heap_
void heap_up(int index_in)
heap(int max_items)
Create a heap with this number of items.
float coval(int index) const