24#ifndef PAIRING_HEAP_H_
25#define PAIRING_HEAP_H_
53 friend std::ostream& operator<< <T>(std::ostream &os,
const PairingHeap<T> &b);
60 element( theElement ),
61 leftChild(nullptr), nextSibling(nullptr),
prev(nullptr)
69 friend std::ostream& operator<< <T>(std::ostream &os,
const PairingHeap<T> &b);
83 if (root ==
nullptr) {
84 if(broot !=
nullptr) {
88 compareAndLink(root, broot);
104 bool (*lessThan)(
T const &lhs,
T const &rhs);
std::ostream & operator<<(std::ostream &os, const PairingHeap< T > &b)
Pairing heap datastructure implementation.
PairingHeap & operator=(const PairingHeap &rhs)=delete
const T & findMin() const
PairingHeap(PairingHeap &&rhs)=delete
PairNode< T > * insert(const T &x)
PairingHeap(const PairingHeap &rhs)=delete
PairNode< T > * getRoot()
PairingHeap & operator=(PairingHeap &&rhs)=delete
void merge(PairingHeap< T > *rhs)