1 unstable release
new 0.1.0 | Apr 4, 2025 |
---|
#4 in #graphtheory
Used in 48 crates
(3 directly)
16KB
126 lines
Icentral Label Map
icentral-label-map
is a versatile crate designed for handling label mappings within directed graphs. Employing advanced data structures, such as HashMap
, this crate is optimized for efficiency when managing complex node relationships in graph theory applications. By leveraging the LabelMap
structure, developers can create, modify, and query label maps dynamically, enabling seamless graph transformations and data manipulation.
Overview
The LabelMap
structure is implemented with various methods allowing for the creation of named empty maps, insertion and retrieval of node mappings, and edge remapping. Detailed macro definitions ensure repetitive operations are minimized, promoting concise code within your applications.
Key Features:
- Dynamic Mapping: Handle real-time updates to node mappings using
insert_outin
andresize_inout
. - Graph Transformations: Effortlessly transform source and destination node pairs using
mapped_edge
andprojected_edge
. - Flexible Initialization: Generate label maps directly from graphs or specify initial sizes and default values.
Code Example
use icentral_label_map::LabelMap;
let mut map = LabelMap::empty("MyMap");
map.insert_outin(NodeId::new(1), NodeId::new(2));
let edge = map.mapped_edge(&Edge::new(NodeId::new(1), NodeId::new(2)));
Installation
Add the following dependency to your Cargo.toml
:
[dependencies]
icentral-label-map = "0.1.0"
Note
This README.md file was generated by an AI model and may not be 100% accurate; however, it should be pretty good. Please refer to the source code and documentation for a detailed understanding of functionalities.
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–25MB
~387K SLoC