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 400 of file DecisionTreeFactor.cpp.
|
inline |
Default constructor.
Definition at line 405 of file DecisionTreeFactor.cpp.
|
inline |
Return true if heap is empty.
Definition at line 447 of file DecisionTreeFactor.cpp.
|
inline |
Pop the top value of the heap.
Definition at line 422 of file DecisionTreeFactor.cpp.
|
inline |
Print the heap as a sequence.
s | A string to prologue the output. |
Definition at line 437 of file DecisionTreeFactor.cpp.
|
inline |
Push value onto the heap.
Definition at line 408 of file DecisionTreeFactor.cpp.
|
inline |
Push value x
, n
number of times.
Definition at line 414 of file DecisionTreeFactor.cpp.
|
inline |
Return the size of the heap.
Definition at line 450 of file DecisionTreeFactor.cpp.
|
inline |
Return the top value of the heap without popping it.
Definition at line 430 of file DecisionTreeFactor.cpp.
|
private |
Definition at line 401 of file DecisionTreeFactor.cpp.