Port details on branch 2022Q2 |
- py-heapdict Heap with decrease-key and increase-key operations
- 1.0.1_1 devel =0 1.0.1Version of this port present on the latest quarterly branch.
- Maintainer: sunpoet@FreeBSD.org
- Port Added: 2020-02-02 10:57:23
- Last Update: 2024-04-08 20:17:00
- Commit Hash: 2e2a676
- Also Listed In: python
- License: BSD3CLAUSE
- WWW:
- https://github.com/DanielStutzbach/heapdict
- Description:
- heapdict implements the MutableMapping ABC, meaning it works pretty much like a
regular Python dict. It's designed to be used as a priority queue, where items
are added and consumed as follows:
hd = heapdict()
hd[obj1] = priority1
hd[obj2] = priority2
# ...
(obj, priority) = hd.popitem()
Compared to an ordinary dict, a heapdict has the following differences:
- popitem():
Remove and return the (key, priority) pair with the lowest priority, instead
of a random object.
- peekitem():
Return the (key, priority) pair with the lowest priority, without removing it.
Unlike the Python standard library's heapq module, the heapdict supports
efficiently changing the priority of an existing object (often called "decrease-
key" in textbooks). Altering the priority is important for many algorithms such
as Dijkstra's Algorithm and A*.
- ¦ ¦ ¦ ¦
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - There is no configure plist information for this port.
- Dependency lines:
-
- ${PYTHON_PKGNAMEPREFIX}heapdict>0:devel/py-heapdict@${PY_FLAVOR}
- To install the port:
- cd /usr/ports/devel/py-heapdict/ && make install clean
- To add the package, run one of these commands:
- pkg install devel/py-heapdict
- pkg install py39-heapdict
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above. NOTE: This is a Python port. Instead of py39-heapdict listed in the above command, you can pick from the names under the Packages section.- PKGNAME: py39-heapdict
- Package flavors (<flavor>: <package>)
- distinfo:
- TIMESTAMP = 1580562237
SHA256 (HeapDict-1.0.1.tar.gz) = 8495f57b3e03d8e46d5f1b2cc62ca881aca392fd5cc048dc0aa2e1a6d23ecdb6
SIZE (HeapDict-1.0.1.tar.gz) = 4274
Packages (timestamps in pop-ups are UTC):
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- py39-setuptools>=0 : devel/py-setuptools@py39
- py39-wheel>=0 : devel/py-wheel@py39
- python3.9 : lang/python39
- py39-build>=0 : devel/py-build@py39
- py39-installer>=0 : devel/py-installer@py39
- Test dependencies:
-
- python3.9 : lang/python39
- Runtime dependencies:
-
- python3.9 : lang/python39
- There are no ports dependent upon this port
Configuration Options:
- No options to configure
- Options name:
- devel_py-heapdict
- USES:
- python
- FreshPorts was unable to extract/find any pkg message
- Master Sites:
|