#graph #cycle #graph-algorithms #algorithm #centrality #biconnected

icentral-graph

A Rust library for advanced graph manipulation, focusing on minimum union cycles, betweenness centrality, and biconnected components

1 unstable release

new 0.1.0 Apr 4, 2025

#3 in #centrality


Used in 18 crates

MIT/Apache

68KB
1.5K SLoC

icentral-graph

Overview

icentral-graph is a Rust library for advanced manipulation and analysis of undirected graphs. It provides a sophisticated framework for graph algorithms with a focus on minimum union cycles (MUCs), betweenness centrality, and biconnected components.

Core Concepts

  • Minimum Union Cycle (MUC): At the heart of the library is the MUC, an intricate data structure to represent cycles within a graph. The library facilitates operations such as constructing, finding, and updating minimum union cycles.
  • Betweenness Centrality: Utilize algorithms to compute the betweenness centrality, which is crucial for identifying the most pivotal vertices in respect to information flow within the graph.
  • Graph Debugging: Comprehensive debug utilities to assist in visualizing and diagnosing the state of graph edges and cycles in various forms.

Key Features

  • Graph Initialization: Start with Graph::empty() to initialize a new graph instance, then populate it via insert_edge().
  • Advanced Debugging Traits: Leverage traits such as SetMucDebug and GetEdgeListDebugger for in-depth visualization of graph elements.
  • Efficiency in Graph Operations: Exploit methods like find_edge_bcc_with_delta for efficient exploration and manipulation of graph structures.
  • Connected Components: Use find_edge_bcc_with_component to retrieve articulation points and subgraph sizes linked to these points.
  • MUC-Based Operations: Seamlessly execute MUC-based algorithms, including construction and exploration of subgraphs derived from MUCs.

Example Usage

use icentral_graph::Graph;

fn main() {
    let mut graph = Graph::empty("example_graph");
    graph.init_size(5);
    graph.insert_edge(&Edge::new(0, 1));
    graph.insert_edge(&Edge::new(1, 2));
    println!("Graph with {} edges: {:?}", graph.num_edges(), graph);
}

Dependencies

This crate builds on Rust's 2021 edition, ensuring maximum compatibility with modern Rust practices.

Contribution

We welcome contributions from the community. Please adhere to the coding standards outlined and make use of the issue tracker for bug reports and feature requests.

Disclaimer

This README.md file was generated by an AI model and may not be 100% accurate, however, it should be quite useful.

This crate is in the process of being translated from c++ to rust. Currently, it still needs exhaustive testing. It is likely there currently exist many glitches which need to be fixed before proper usage. This crate is based on the original icentral program developed by Fuad Jamor. Please see the following repository for details: https://github.com/fjamour/icentral.

For progress updates, see the workspacer rust project.

Dependencies

~16–26MB
~397K SLoC