Skip to main content

blossalg

blossalg is a Python implementation of the Edmonds algorithm for constructing maximum matchings on graphs. For more information on how the Edmonds algorithm works see the Wikipedia page.

alt text

Installation

You can install blossalg from PyPI:

pip install blossalg

blossalg is supported on Python 2.7.

Usage

You can run blossalg as follows:

blossalg infile.csv [outfile.txt]

The input file infile.csv contains information on the number of nodes and the neighbours of each node. This information is stored using a series of comma-delimited binary-valued strings. Nodes are identified by different rows and columns and a value of 1 indicates a node neighbour. By convention a node cannot be a neighbour with itself.

For example, the input file of a three node graph where both node 0 and node 2 are neighbours of node 1 would look as follows:

0,1,0
1,0,1
0,1,0

Given an input file, blossalg will compute the maximum matching using the Edmonds blossom algorithm. The total number of matched nodes will then be output to screen.

If an output file outfile.txt is supplied the matched pairs from the maximal matching will be saved to the file. The format of the output is as follows. Each node and its matched node will be stored as node_number: matched_node_number. The node number will correspond to the node number from the input file (e.g. row 1 in the input file will represent node 0 in the output file). Each matched pair in the output file will be separated by a newline. By convention, unmatched nodes are not included in the outfile.

Metadata

Release files for blossalg 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blossalg 1.0.0
File Size Uploaded Provenance Actions
blossalg-1.0.0.tar.gz 5.3 kB Without provenance Details for blossalg-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for blossalg 1.0.0
File Interpreter ABI Platform Actions
blossalg-1.0.0-py2-none-any.whl Python 2 none any Details for blossalg-1.0.0-py2-none-any.whl

Total release size: 12.4 kB

Release files / blossalg-1.0.0.tar.gz

Download URL blossalg-1.0.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9d9efbf5e42ccaee511b916849c155ebc8b69249859704a42311b71934b81716
BLAKE2b-256 checksum
How to use checksums
86ed2e96767f8ca28605dec65a45985f2f05ab56547bcc1d283677f1150d5594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/2.7.18

Release files / blossalg-1.0.0-py2-none-any.whl

Download URL blossalg-1.0.0-py2-none-any.whl
Size 7.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
d6c2d785fce21858ad0c4cf582f186c6dc89f775a7335714329ff1c153176055
BLAKE2b-256 checksum
How to use checksums
06a297c39807fa3c9929d8e8ca0505f06d94a179439f619042152ef783b2efa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/2.7.18

Security for blossalg 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page