BSD Ports

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

SystemPortVersion
FreeBSDdevel/py-heapdict1.0.1_1
DragonFlydevel/py-heapdict1.0.1_1
HardenedBSDdevel/py-heapdict1.0.1_1
GhostBSDdevel/py-heapdict1.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.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest1.0.1_11.0.1_11.0.11.0.1_11.0.1_1
FreeBSD:14:quarterly1.0.1_11.0.1_1n/a1.0.1_11.0.1_1
FreeBSD:15:latest1.0.1_11.0.1_1n/a1.0.1_11.0.1_1
FreeBSD:15:quarterly1.0.1_11.0.1_1n/an/an/a
FreeBSD:16:latest1.0.1_11.0.1_1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 2

The full lists below include those, and their dependencies in turn.

Build dependencies 16
Run dependencies 7

Configuration

No options to configure.

USES
python
Service scripts
none

Files

distinfo 1
FileSizeSHA256
HeapDict-1.0.1.tar.gz42748495f57b3e03d8e46d5f1b2cc62ca881aca392fd5cc048dc0aa2e1a6d23ecdb6
Master sites 1
  • PYPI

Commit history 0

No commits in the history this site was built from.