1 unstable release
new 0.1.0 | Apr 4, 2025 |
---|
#9 in #centrality
Used in 28 crates
(9 directly)
28KB
528 lines
iCentral Workspace
Overview
iCentral Workspace is a Rust crate designed to facilitate intricate data manipulation and storage for calculations involving centrality in large graph structures. It helps manage dynamic graph updates by efficiently tracking and updating required metrics during graph modifications.
Functionality
The ICentralWorkspace
struct serves as a container for managing graph-related data during iterative processes of the iCentral algorithm. The workspace captures key metrics like path counts, node distances, and intermediary computation results before and after graph edge insertions.
Usage
Initialization
Create a new instance of the ICentralWorkspace
with the desired size and name:
let workspace = ICentralWorkspace::new_init_all(nodes_count, "workspace_name");
Public Interface
- Sigma Management: Retrieve or set new sigma values using
new_sigmas()
and associated methods to keep track of path counts. - Delta Management: Calculate and update delta values during path recalculations for centrality measures.
- Distance and Parent Handling: Efficiently manage vertex distances and parent references to construct and update shortest paths.
Efficiency Enhancements
The crate includes advanced methods such as fix_order_of_workspace_stack
, utilizing optimized sorting techniques for performance improvement, presenting opportunities for further optimization in bottleneck areas.
Examples
Updating Sigma Values
workspace.set_new_sigmas_from(&other_sigmas);
Path and Delta Management
workspace.compute_new_path_counts_and_paths(src_node, dst_node);
workspace.update_new_deltas_with_new_sigma_ratio(v_p, v_n);
Design Considerations
- The library is architectured for flexibility, allowing adjustments in data handling and internal computations.
- Designed with future scalability in mind, the crate anticipates potential improvements, optimizing storage and retrieval operations as graph complexity evolves.
Acknowledgment
This README.md file was generated by an AI model and may not be 100% accurate, though it strives for precise and useful information.
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
~14–25MB
~364K SLoC