
Public Member Functions | |
| Heap () | |
| Heap (C *co) | |
| void | initcomp (C *co) |
| void | percolateUp (int i) |
| void | percolateDown (int i) |
| bool | ok (int n) |
| int | size () |
| void | setBounds (int size) |
| bool | inHeap (int n) |
| void | increase (int n) |
| void | decrease (int n) |
| bool | empty () |
| void | insert (int n) |
| int | getminwopop () |
| int | getmin () |
| bool | heapProperty () |
| bool | heapProperty (int i) |
| void | print () |
Public Attributes | |
| vectint | heap |
| vectint | indices |
Private Types | |
| typedef vector< int > | vectint |
Private Attributes | |
| C * | comp |
Definition at line 31 of file heap.cc.
| void Heap< C >::initcomp | ( | C * | co | ) | [inline] |
| void Heap< C >::percolateUp | ( | int | i | ) | [inline] |
Definition at line 51 of file heap.cc.
References Heap< C >::comp, Heap< C >::heap, Heap< C >::indices, and parent().
Referenced by Heap< C >::increase(), and Heap< C >::insert().
| void Heap< C >::percolateDown | ( | int | i | ) | [inline] |
Definition at line 63 of file heap.cc.
References Heap< C >::comp, Heap< C >::heap, Heap< C >::indices, left(), and right().
Referenced by Heap< C >::decrease(), and Heap< C >::getmin().
| bool Heap< C >::ok | ( | int | n | ) | [inline] |
| int Heap< C >::size | ( | ) | [inline] |
| void Heap< C >::setBounds | ( | int | size | ) | [inline] |
Definition at line 87 of file heap.cc.
References Heap< C >::indices.
Referenced by BranchingHeuristic::BranchingHeuristic().
| bool Heap< C >::inHeap | ( | int | n | ) | [inline] |
Definition at line 93 of file heap.cc.
References Heap< C >::indices.
Referenced by Heap< C >::insert().
| void Heap< C >::increase | ( | int | n | ) | [inline] |
Definition at line 98 of file heap.cc.
References Heap< C >::indices, and Heap< C >::percolateUp().
Referenced by BranchingHeuristic::updateVar().
| void Heap< C >::decrease | ( | int | n | ) | [inline] |
Definition at line 104 of file heap.cc.
References Heap< C >::indices, and Heap< C >::percolateDown().
Referenced by BranchingHeuristic::updateVar().
| bool Heap< C >::empty | ( | ) | [inline] |
| void Heap< C >::insert | ( | int | n | ) | [inline] |
Definition at line 114 of file heap.cc.
References Heap< C >::heap, Heap< C >::indices, Heap< C >::inHeap(), and Heap< C >::percolateUp().
Referenced by BranchingHeuristic::backtrack(), and BranchingHeuristic::BranchingHeuristic().
| int Heap< C >::getminwopop | ( | ) | [inline] |
Definition at line 122 of file heap.cc.
References Heap< C >::heap.
Referenced by BranchingHeuristic::nextVar().
| int Heap< C >::getmin | ( | ) | [inline] |
Definition at line 126 of file heap.cc.
References Heap< C >::heap, Heap< C >::indices, and Heap< C >::percolateDown().
Referenced by BranchingHeuristic::nextVar().
| bool Heap< C >::heapProperty | ( | ) | [inline] |
| bool Heap< C >::heapProperty | ( | int | i | ) | [inline] |
Definition at line 139 of file heap.cc.
References Heap< C >::heap, Heap< C >::heapProperty(), left(), parent(), and right().
| void Heap< C >::print | ( | ) | [inline] |
Definition at line 34 of file heap.cc.
Referenced by Heap< C >::Heap(), Heap< C >::initcomp(), Heap< C >::percolateDown(), and Heap< C >::percolateUp().
Definition at line 36 of file heap.cc.
Referenced by Heap< C >::empty(), Heap< C >::getmin(), Heap< C >::getminwopop(), Heap< C >::Heap(), Heap< C >::heapProperty(), Heap< C >::insert(), Heap< C >::percolateDown(), Heap< C >::percolateUp(), Heap< C >::print(), and Heap< C >::size().
Definition at line 37 of file heap.cc.
Referenced by Heap< C >::decrease(), Heap< C >::getmin(), Heap< C >::increase(), Heap< C >::inHeap(), Heap< C >::insert(), Heap< C >::ok(), Heap< C >::percolateDown(), Heap< C >::percolateUp(), Heap< C >::print(), and Heap< C >::setBounds().
1.5.2