| Crates.io | icentral-node-stack |
| lib.rs | icentral-node-stack |
| version | 0.1.0 |
| created_at | 2025-04-04 21:01:05.85147+00 |
| updated_at | 2025-04-04 21:01:05.85147+00 |
| description | icentral-node-stack is a Rust crate designed to facilitate stack-based operations on NodeId structures. It offers efficient node management with capabilities for accessing, modifying, and manipulating node stacks, enabling advanced data structure handling and simulation scenarios. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1620747 |
| size | 52,874 |
icentral-node-stack is a Rust crate that provides efficient, stack-based data management functionality with traits and implementations tailored for handling NodeId structures. It offers a robust interface to maintain and manipulate collections of node identifiers, facilitating operations essential for traversal, modification, and analysis in data structure management.
NodeAtIndex and SetNodeAtIndex traits to access and modify nodes at specific indices.push and pop, streamlining operations typical of stack data structures through the Push and Pop traits.CreateNamedEmpty and Clear further enhance the management of node stacks.delegate_to_bfs_stack! macro provides extensive capabilities for integrating breadth-first search strategies directly within stack operations.To utilize the icentral-node-stack crate, add the following to your Cargo.toml:
[dependencies]
icentral-node-stack = "0.1.0"
use icentral_node_stack::{NodeIdStack, NodeId, Push, Pop};
fn main() {
let first_node = NodeId::new(); // Assume NodeId::new() creates a new NodeId
let mut stack = NodeIdStack::new(first_node, "example");
// Push a new node
stack.push(NodeId::new());
// Access a node at index
let node = stack.node_at_index(0);
// Modify a node at a specific index
stack.set_node_at_index(0, NodeId::new());
// Pop a node
if let Some(popped_node) = stack.pop() {
println!("Popped node: {:?}", popped_node);
}
}
For further information and more intricate usage patterns, please refer to the documentation. This documentation includes additional examples and feature explanations to assist you in effectively utilizing this crate.
This README.md file was generated by an AI model. While it strives for accuracy, some details may not fully reflect the latest state of the crate. However, it should provide a solid starting point and overview.
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.