You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Christian Decker 04f139f092 scripted: Materialize submodules 4 years ago
..
LICENSE scripted: Materialize submodules 4 years ago
Makefile scripted: Materialize submodules 4 years ago
README scripted: Materialize submodules 4 years ago
galgorithm.h scripted: Materialize submodules 4 years ago
galgorithm.hpp scripted: Materialize submodules 4 years ago
gheap.h scripted: Materialize submodules 4 years ago
gheap.hpp scripted: Materialize submodules 4 years ago
gheap_cpp03.hpp scripted: Materialize submodules 4 years ago
gheap_cpp11.hpp scripted: Materialize submodules 4 years ago
gpriority_queue.h scripted: Materialize submodules 4 years ago
gpriority_queue.hpp scripted: Materialize submodules 4 years ago
ops_count_test.cpp scripted: Materialize submodules 4 years ago
perftests.c scripted: Materialize submodules 4 years ago
perftests.cpp scripted: Materialize submodules 4 years ago
tests.c scripted: Materialize submodules 4 years ago
tests.cpp scripted: Materialize submodules 4 years ago

README

Generalized heap implementation

Generalized heap is based on usual heap data structure -
http://en.wikipedia.org/wiki/Heap_%28data_structure%29 .

It provides two additional paremeters, which allow optimizing heap
for particular cases:

* Fanout. The number of children per each heap node.
* Fanout=1 corresponds to sorted List data structure.
See http://en.wikipedia.org/wiki/List_%28computing%29 .
* Fanout=2 corresponds to Binary heap.
See http://en.wikipedia.org/wiki/Binary_heap .
* Fanout>2 corresponds to D-heap. See http://en.wikipedia.org/wiki/D-heap .
D-heap can be faster than Binary heap in the following cases:
* If item comparison is faster than item assignment.
* If sequential access to items is faster than non-sequential access
to items.
* If the number of 'decrease key' operations is larger than the number
of 'pop heap' operations for min-heap. This is usually the case
for Dijkstra algorithm
( http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm )