devel/py-heapdict 1.0.1_1 FreeBSD
Heap with decrease-key and increase-key operations
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- License
- BSD3CLAUSE
- Categories
- devel, python
- Package size
- 7.3 KiB, 19.6 KiB installed
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*.
In the other systems
| System | Port | Version |
|---|---|---|
| FreeBSD | devel/py-heapdict | 1.0.1_1 |
| DragonFly | devel/py-heapdict | 1.0.1_1 |
| HardenedBSD | devel/py-heapdict | 1.0.1_1 |
| GhostBSD | devel/py-heapdict | 1.0.1_1 |
Install
Binary package:
pkg install py312-heapdict
From the ports tree:
cd /usr/ports/devel/py-heapdict/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= py312-heapdict>0:devel/py-heapdict
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 1.0.1_1 | 1.0.1_1 | 1.0.1 | 1.0.1_1 | 1.0.1_1 |
| FreeBSD:14:quarterly | 1.0.1_1 | 1.0.1_1 | n/a | 1.0.1_1 | 1.0.1_1 |
| FreeBSD:15:latest | 1.0.1_1 | 1.0.1_1 | n/a | 1.0.1_1 | 1.0.1_1 |
| FreeBSD:15:quarterly | 1.0.1_1 | 1.0.1_1 | n/a | n/a | n/a |
| FreeBSD:16:latest | 1.0.1_1 | 1.0.1_1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Build 2
${PYTHON_PKGNAMEPREFIX}setuptools>=0: devel/py-setuptools${PYTHON_PKGNAMEPREFIX}wheel>=0: devel/py-wheel
The full lists below include those, and their dependencies in turn.
Build dependencies 16
Run dependencies 7
Required by 3
Configuration
No options to configure.
- USES
- python
- Service scripts
- none
Files
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| HeapDict-1.0.1.tar.gz | 4274 | 8495f57b3e03d8e46d5f1b2cc62ca881aca392fd5cc048dc0aa2e1a6d23ecdb6 |
Master sites 1
- PYPI
Commit history 0
No commits in the history this site was built from.