Rosetta 3.3
Public Member Functions
utility::heap Class Reference

#include <heap.hh>

Inheritance diagram for utility::heap:
Inheritance graph
[legend]
Collaboration diagram for utility::heap:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 heap (int max_items)
 Create a heap with this number of items.
 ~heap ()
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, and the returned values are put into the arguments val and coval.
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.
float coval (int index) const
int val (int index) const
int size () const
int capacity () const

Constructor & Destructor Documentation

utility::heap::heap ( int  max_items) [inline]

Create a heap with this number of items.

utility::heap::~heap ( ) [inline]

Member Function Documentation

int utility::heap::capacity ( ) const
float utility::heap::coval ( int  index) const

References ObjexxFCL::index().

Referenced by heap_insert(), and heap_replace().

void utility::heap::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.

modifes heap and last_val return val and err.

heap_extract

float utility::heap::heap_head ( ) const

returns the smallest covalue stored in the heap.

void utility::heap::heap_insert ( int  val,
float  coval,
bool err 
)

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

heap_insert

References coval(), heap_replace(), and val().

void utility::heap::heap_replace ( int  val,
float  coval 
)

heap_replace

References coval(), and val().

Referenced by heap_insert().

void utility::heap::reset_coval ( int  val,
float  coval 
)

References ObjexxFCL::index().

int utility::heap::size ( ) const
int utility::heap::val ( int  index) const

References ObjexxFCL::index().

Referenced by heap_insert(), and heap_replace().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines