|
FastJet 3.5.0
|
#include <fastjet/internal/MinHeap.hh>
Public Member Functions | |
| MinHeap (const std::vector< double > &values, unsigned int max_size) | |
| construct a MinHeap from the vector of values, allowing future expansion to a maximum size max_size; | |
| MinHeap (unsigned int max_size) | |
| do the minimal setup for a MinHeap that can reach max_size; initialisation must be performed later with the actual values. | |
| MinHeap (const std::vector< double > &values) | |
| constructor in which the the maximum size is the size of the values array | |
| void | initialise (const std::vector< double > &values) |
| initialise the heap with the supplied values. | |
| unsigned int | minloc () const |
| return the location of the minimal value on the heap | |
| double | minval () const |
| return the minimal value on the heap | |
| double | operator[] (int i) const |
| void | remove (unsigned int loc) |
| remove the value at the specified location (i.e. | |
| void | update (unsigned int, double) |
| update the value at the specified location | |
Definition at line 49 of file MinHeap.hh.
|
inline |
construct a MinHeap from the vector of values, allowing future expansion to a maximum size max_size;
Definition at line 53 of file MinHeap.hh.
|
inline |
do the minimal setup for a MinHeap that can reach max_size; initialisation must be performed later with the actual values.
Definition at line 58 of file MinHeap.hh.
|
inline |
constructor in which the the maximum size is the size of the values array
Definition at line 61 of file MinHeap.hh.
| void fastjet::MinHeap::initialise | ( | const std::vector< double > & | values | ) |
initialise the heap with the supplied values.
construct the MinHeap; structure will be as follows: Should only be called if the constructor did not supply values.
_heap[0].minloc points to globally smallest entry _heap[1].minloc points to smallest entry in one half of heap _heap[2].minloc points to smallest entry in other half of heap
. for _heap[i], the "parent" is to be found at (i-1)/2
Definition at line 47 of file MinHeap.cc.
|
inline |
return the location of the minimal value on the heap
Definition at line 69 of file MinHeap.hh.
|
inline |
return the minimal value on the heap
Definition at line 73 of file MinHeap.hh.
|
inline |
Definition at line 75 of file MinHeap.hh.
|
inline |
remove the value at the specified location (i.e.
replace it with the largest possible value).
Definition at line 79 of file MinHeap.hh.
| void fastjet::MinHeap::update | ( | unsigned int | loc, |
| double | new_value | ||
| ) |
update the value at the specified location
Definition at line 79 of file MinHeap.cc.