Skip to main content

A simple python package for graph theory that supports multi-edges, hyper-edges, looped-edges and every other combination of these.

Project description

multihypergraph

##Description A simple python package for graph theory that supports multi-edges, hyper-edges, looped-edges and every other combination of these. This package is an exercise in defining statically-typed, functional implementations of graphs that have the following features:

  • Each vertex of the graph is a characted. For example 'ab,bc,ac'" is a triangle graph with vertices {'a', 'b', 'c'}.
  • Multi-edges are allowed. 'ab,ab' is a valid graph.
  • Hyper-edges are allowed. 'abc' is a valid graph.
  • Self-loops are allowed. 'aa' is a valid graph.
  • Collapsed edges are allowed. 'aab' is a valid graph

Check out the wikipedia entries for Hypergraph and Multigraph. Think of this package as happy marriage between the two.

Installation

pip install multihypergraph

Features

  • Almost all the code is functional.
  • Mutability of data types is never used.
  • All types are explicitly mentioned using static-typing (and checked courtesy mypy).
  • The above mentioned feature makes it easier to reason mathematically about the code.
  • The emphasis is on mathematical understanding and soundness rather than algorithmic efficiency.
  • The top-level scripts are divided into objects/ and morphisms/ to emphasize the category-theoretic structure of multihypergraphs.
  • Functional programming allows us to write easy-to-decipher tests using pytest.

Project details


Release history Release notifications

This version

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for multihypergraph, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size multihypergraph-0.0.1-py3-none-any.whl (21.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size multihypergraph-0.0.1.tar.gz (6.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page