Skip to content

Erlang Priority Queue (EPRIQ) based on pairing heap algorithm.

Notifications You must be signed in to change notification settings

mohsenmoqadam/EPRIQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EPRIQ

Erlang Priority Queue (EPRIQ) based on pairing heap algorithm.

Pairing Heap

Pairing heap is a sorting algorithm with good practical amortized performance. The amortized time per delete-node is O(log n), and the operations find-min(max), and add-node run in O(1) amortized time.

How to use?

You can use this module as regular Erlang modules or compile and test it by this recipe: (write these commands on Erlang REPL)

c(epriq).
c(epriq_test).
epriq_test:run().

It creates an empty queue and adds 100 nodes to it with random priority between 1 and 10. then prints nodes based on their priority.

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Erlang Priority Queue (EPRIQ) based on pairing heap algorithm.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages