Min-Heap class to help with pruning. The top
element is always the smallest value.
More...
Public Member Functions | |
bool | empty () const |
Return true if heap is empty. More... | |
MinHeap () | |
Default constructor. More... | |
double | pop () |
Pop the top value of the heap. More... | |
void | print (const std::string &s="") |
Print the heap as a sequence. More... | |
void | push (double x) |
Push value onto the heap. More... | |
void | push (double x, size_t n) |
Push value x , n number of times. More... | |
size_t | size () const |
Return the size of the heap. More... | |
double | top () |
Return the top value of the heap without popping it. More... | |
Private Attributes | |
std::vector< double > | v_ |
Min-Heap class to help with pruning. The top
element is always the smallest value.
Definition at line 356 of file DecisionTreeFactor.cpp.
|
inline |
Default constructor.
Definition at line 361 of file DecisionTreeFactor.cpp.
|
inline |
Return true if heap is empty.
Definition at line 403 of file DecisionTreeFactor.cpp.
|
inline |
Pop the top value of the heap.
Definition at line 378 of file DecisionTreeFactor.cpp.
|
inline |
Print the heap as a sequence.
s | A string to prologue the output. |
Definition at line 393 of file DecisionTreeFactor.cpp.
|
inline |
Push value onto the heap.
Definition at line 364 of file DecisionTreeFactor.cpp.
|
inline |
Push value x
, n
number of times.
Definition at line 370 of file DecisionTreeFactor.cpp.
|
inline |
Return the size of the heap.
Definition at line 406 of file DecisionTreeFactor.cpp.
|
inline |
Return the top value of the heap without popping it.
Definition at line 386 of file DecisionTreeFactor.cpp.
|
private |
Definition at line 357 of file DecisionTreeFactor.cpp.