diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-haskell/psqueues/metadata.xml | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-haskell/psqueues/metadata.xml')
-rw-r--r-- | dev-haskell/psqueues/metadata.xml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-haskell/psqueues/metadata.xml b/dev-haskell/psqueues/metadata.xml new file mode 100644 index 000000000000..4860915e4a9d --- /dev/null +++ b/dev-haskell/psqueues/metadata.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>haskell@gentoo.org</email> + <name>Gentoo Haskell</name> + </maintainer> + <longdescription> + The psqueues package provides + <https://en.wikipedia.org/wiki/Priority_queue Priority Search Queues> in + three different flavors. + + * @OrdPSQ k p v@, which uses the @Ord k@ instance to provide fast insertion, + deletion and lookup. This implementation is based on Ralf Hinze's + <http://citeseer.ist.psu.edu/hinze01simple.html A Simple Implementation Technique for Priority Search Queues>. + Hence, it is similar to the + <http://hackage.haskell.org/package/PSQueue PSQueue> library, although it is + considerably faster and provides a slightly different API. + + * @IntPSQ p v@ is a far more efficient implementation. It fixes the key type + to @Int@ and uses a <https://en.wikipedia.org/wiki/Radix_tree radix tree> + (like @IntMap@) with an additional min-heap property. + + * @HashPSQ k p v@ is a fairly straightforward extension of @IntPSQ@: it + simply uses the keys' hashes as indices in the @IntPSQ@. If there are any + hash collisions, it uses an @OrdPSQ@ to resolve those. The performance of + this implementation is comparable to that of @IntPSQ@, but it is more widely + applicable since the keys are not restricted to @Int@, but rather to any + @Hashable@ datatype. + + Each of the three implementations provides the same API, so they can be used + interchangeably. The benchmarks show how they perform relative to one + another, and also compared to the other Priority Search Queue + implementations on Hackage: + <http://hackage.haskell.org/package/PSQueue PSQueue> + and + <http://hackage.haskell.org/package/fingertree-psqueue fingertree-psqueue>. + + <<http://i.imgur.com/KmbDKR6.png>> + + <<http://i.imgur.com/ClT181D.png>> + + Typical applications of Priority Search Queues include: + + * Caches, and more specifically LRU Caches; + + * Schedulers; + + * Pathfinding algorithms, such as Dijkstra's and A*. + </longdescription> +</pkgmetadata> |