linnet

Crates.iolinnet
lib.rslinnet
version0.12.0
created_at2025-03-28 15:49:52.697975+00
updated_at2025-08-18 08:09:50.058844+00
descriptionA library for working with half-edge data structures, and subgraphs, and drawing them
homepage
repository
max_upload_size
id1609808
size1,167,077
Lucien Huber (lcnbr)

documentation

README

crates.io DOI

Linnet

Linnet is a graph library, specifically designed and developed to represent tensor networks and Feynman diagrams as used in projects like gammaloop and spenso.

The choice of a half-edge data structure is central to Linnet's design. This structure is exceptionally well-suited for these applications because it intrinsically supports the definition and manipulation of subgraphs that can be cleanly and efficiently "split" along edges (so that node degree is preserved).

All of the graph algorithms, iterators and graph manipulations operate at the level of subgraphs (which can also be the whole graph).

Key Features

  • Efficient Half-Edge Data Structure: Utilizes a half-edge representation, enabling efficient graph traversal, easy graph modifications like:
    • node identification
    • subgraph excision (splitting graphs in two)
    • graph joining along sewn along half edges
    • edge contraction
  • Subgraph Manipulation: Provides capabilities for defining, extracting, and analyzing various types of subgraphs, such as those induced by node properties, connectivity patterns (e.g., cycles, biconnected components), or graph cuts.
  • Graph Drawing & Visualization: Includes functionalities for generating visual representations of graphs. Provides graph layouting based on simulated annealing of pseudo spring forces.
  • Dot Parsing Integrates dot-parser curtesy of Martin Vassor integrated in a macro.

Getting Started

To start using Linnet in your Rust project, add it as a dependency in your Cargo.toml:

[dependencies]
linnet = "0.6.2"

Acknowledgement

This crate was written by Lucien Huber

Commit count: 0

cargo fmt