#graph #abstract #implementation #bigraph #bidirected


Different representations with implemented operations on bigraphs

24 releases (4 stable)

Uses new Rust 2021

2.0.2 Aug 4, 2022
2.0.1 Jun 9, 2022
1.0.0 Jun 1, 2022
0.8.0 Mar 8, 2022
0.1.0-alpha.6 Jul 22, 2020

#448 in Data structures

Download history 41/week @ 2022-04-21 90/week @ 2022-04-28 154/week @ 2022-05-05 337/week @ 2022-05-12 96/week @ 2022-05-19 206/week @ 2022-05-26 390/week @ 2022-06-02 124/week @ 2022-06-09 32/week @ 2022-06-16 21/week @ 2022-06-23 34/week @ 2022-06-30 52/week @ 2022-07-07 34/week @ 2022-07-14 77/week @ 2022-07-21 35/week @ 2022-07-28 159/week @ 2022-08-04

330 downloads per month
Used in 3 crates (2 directly)


1.5K SLoC


A Rust crate to represent and operate on bigraphs.

The crate defines traits as abstractions from the concrete graph implementation. At the moment, the only implementation is done via a wrapper over petgraph, which serves as a prototype.


A crate to represent a bigraph. Bigraphs are graphs where each node is symmetrically mapped to a unique "mirror" node, and each edge is symmetrically mapped to a unique "mirror" edge.

Note that bigraphs come in two flavours, node- and edge-centric. A node-centric bigraph has edges that are only distinguished by their endpoints, while an edge-centric bigraph's edges are additionally distinguished by their associated data.

This crate implements a simple wrapper around the traitgraph crate, adding a vector to represent the node-mirror function. It also implements the edge-mirror function, albeit probably slower than it could be if there was also a vector to map edges.

In the context of node-centric genome graphs, nodes usually represent genome strings and a pair of mirrored nodes represent reverse complements of each other. For edge-centric genome graphs, the same holds for the edges.


~29K SLoC