#data-structure #graph #hypergraph

hypergraph

Hypergraph is data structure library to create a directed hypergraph in which an hyperedge can join any number of vertices

26 releases (17 stable)

Uses new Rust 2021

1.3.5 Sep 10, 2022
1.3.3 Aug 9, 2022
1.3.2 Jun 23, 2022
1.1.1 Feb 27, 2022
0.1.3 Nov 15, 2020

#142 in Data structures

Download history 68/week @ 2022-06-06 27/week @ 2022-06-13 27/week @ 2022-06-20 7/week @ 2022-06-27 23/week @ 2022-07-04 48/week @ 2022-07-11 23/week @ 2022-07-18 51/week @ 2022-07-25 47/week @ 2022-08-01 50/week @ 2022-08-08 6/week @ 2022-08-15 25/week @ 2022-08-22 19/week @ 2022-08-29 94/week @ 2022-09-05 6/week @ 2022-09-12 17/week @ 2022-09-19

136 downloads per month

MIT license

86KB
1.5K SLoC

graph


GitHub Workflow Status Crates.io docs.rs

Hypergraph is a data structure library to generate directed hypergraphs.

A hypergraph is a generalization of a graph in which a hyperedge can join any number of vertices.

📣 Goal

This library aims at providing the necessary methods for modeling complex, multiway (non-pairwise) relational data found in complex networks. One of the main advantages of using a hypergraph model over a graph one is to provide a more flexible and natural framework to represent entities and their relationships (e.g. Alice uses some social network, shares some data to Bob, who shares it to Carol, etc).

🎁 Features

This library enables you to represent:

  • non-simple hypergraphs with two or more hyperedges - with different weights - containing the exact same set of vertices
  • self-loops - i.e., hyperedges containing vertices directed to themselves one or more times
  • unaries - i.e., hyperedges containing a unique vertex

⚗️ Implementation

  • 100% safe Rust
  • Proper error handling
  • Stable indexes assigned for each hyperedge and each vertex
  • Parallelism (with Rayon)

🛠️ Installation

Add this to your Cargo.toml (replace current_version with the latest version of the library):

[dependencies]
hypergraph = "curent_version"

⚡️ Usage

Please read the documentation to get started.

Dependencies

~2.1–2.8MB
~57K SLoC