|
Simple Application Framework
1
|
The heap data structure and related operations.
#include "../Predicate.h"#include "../../Type.h"#include "../../Type/IteratorTraits.h"#include "../Swap.h"Go to the source code of this file.
Namespaces | |
| namespace | Saf |
| Global library namespace. | |
| namespace | Saf::Algo |
| Generic data handling algorithms and structures. | |
| namespace | Saf::Algo::Struct |
| Generic data structures. | |
| namespace | Saf::Algo::Struct::Heap |
| The heap data structure and related operations. | |
Functions | |
| template<class RanIter , class Pred > | |
| void | Saf::Algo::Struct::Heap::BalanceDown (RanIter begin, Diff node, Diff bottom, Pred pred) |
Percolate the element node to the bottom of a heap. | |
| template<class RanIter , class Pred > | |
| void | Saf::Algo::Struct::Heap::BalanceUp (RanIter begin, Diff top, Diff node, Pred pred) |
Percolate the element node up in the heap if the heap property is not satisfied. | |
| template<class RanIter , class Pred > | |
| bool | Saf::Algo::Struct::Heap::IsHeap (RanIter begin, RanIter end) |
Check whether the range [begin, end) is a max-heap. | |
| template<class RanIter > | |
| bool | Saf::Algo::Struct::Heap::IsHeap (RanIter begin, RanIter end) |
Check whether the range [begin, end) is a max-heap. | |
| template<class RanIter , class Pred > | |
| void | Saf::Algo::Struct::Heap::MakeHeap (RanIter begin, RanIter end, Pred pred) |
Convert the range [begin, end) to a max-heap. | |
| template<class RanIter > | |
| void | Saf::Algo::Struct::Heap::MakeHeap (RanIter begin, RanIter end) |
Convert the range [begin, end) to a max-heap. | |
| template<class RanIter , class Pred > | |
| void | Saf::Algo::Struct::Heap::PopHeap (RanIter begin, RanIter end, Pred pred) |
| Pop the maximum from a heap. | |
| template<class RanIter , class Pred > | |
| void | Saf::Algo::Struct::Heap::PopHeap (RanIter begin, RanIter end) |
| Pop the maximum from a heap. | |
| template<class RanIter , class Pred > | |
| void | Saf::Algo::Struct::Heap::PushHeap (RanIter begin, RanIter end, Pred pred) |
| Insert a new element to a heap. | |
| template<class RanIter > | |
| void | Saf::Algo::Struct::Heap::PushHeap (RanIter begin, RanIter end) |
| Insert a new element to a heap. | |
| template<class RanIter , class Pred > | |
| void | Saf::Algo::Struct::Heap::SortHeap (RanIter begin, RanIter end, Pred pred) |
Sort the elements in a heap range [begin, end). | |
| template<class RanIter > | |
| void | Saf::Algo::Struct::Heap::SortHeap (RanIter begin, RanIter end) |
Sort the elements in a heap range [begin, end). | |
The heap data structure and related operations.
1.8.0