#graph-node #graph #abstract #implementation #bidirected

bigraph

Different representations with implemented operations on bigraphs

35 releases (5 major breaking)

5.0.0 Aug 1, 2023
4.1.0 Jun 22, 2023
3.0.0 Jun 1, 2023
2.1.1 Oct 24, 2022
0.1.0-alpha.6 Jul 22, 2020

#485 in Math

Download history 14/week @ 2024-07-22 79/week @ 2024-07-29 63/week @ 2024-08-05 23/week @ 2024-08-12 54/week @ 2024-08-19 41/week @ 2024-08-26 6/week @ 2024-09-02 15/week @ 2024-09-09 35/week @ 2024-09-16 55/week @ 2024-09-23 22/week @ 2024-09-30 20/week @ 2024-10-07 25/week @ 2024-10-14 92/week @ 2024-10-21 7/week @ 2024-10-28 26/week @ 2024-11-04

151 downloads per month
Used in 5 crates (2 directly)

BSD-2-Clause

89KB
2K SLoC

Bigraph

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.


lib.rs:

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.

Dependencies

~5MB
~82K SLoC