File pairing_queue.hpp

namespace find_embedding
class max_heap_tag
#include <pairing_queue.hpp>
class min_heap_tag
#include <pairing_queue.hpp>
template<typename N>
class pairing_node : public N
#include <pairing_queue.hpp>

Public Functions

pairing_node()
template<class ...Args>
pairing_node(Args... args)
pairing_node<N> *merge_roots(pairing_node<N> *other)

the basic operation of the pairing queue put this and other into heap-order

template<class ...Args>
void refresh(Args... args)
pairing_node<N> *next_root()
pairing_node<N> *merge_pairs()

Private Functions

pairing_node<N> *merge_roots_unsafe(pairing_node<N> *other)

the basic operation of the pairing queue put this and other into heap-order

pairing_node<N> *merge_roots_unchecked(pairing_node *other)

merge_roots, assuming other is not null and that val < other->val.

may invalidate the internal data structure (see source for details)

Private Members

pairing_node *next
pairing_node *desc
template<typename N>
class pairing_queue
#include <pairing_queue.hpp>

Public Functions

pairing_queue(int n)
pairing_queue(pairing_queue &&other)
~pairing_queue()
void reset()
bool empty()
template<class ...Args>
void emplace(Args... args)
N top()
void pop()

Private Members

int count
int size
pairing_node<N> *root
pairing_node<N> *mem
template<typename P, typename heap_tag = min_heap_tag>
class priority_node
#include <pairing_queue.hpp>

Public Functions

priority_node()
priority_node(int n, int r, P d)
bool operator<(const priority_node<P, heap_tag> &b) const

Public Members

int node
int dirt
P dist