icentral-edges 0.1.0

A Rust crate offering comprehensive edge-centric interfaces and operations for graph data structures. Features efficient edge insertion, removal, and querying with customization support.
Documentation
crate::ix!();

#[macro_export] macro_rules! delegate_to_edges {

    () => {

        delegate!{

            to self.edges {

                #[call(len)]
                pub fn num_edges(&self) -> usize;

                #[call(clear)]
                pub fn clear_edges(&mut self);

                pub fn has_edge(&self, edge: &Edge) -> bool;

                pub fn connects(&self, src: NodeId, dst: NodeId) -> bool;

                #[call(unlink_all)]
                pub fn unlink_all_edges_between(&mut self, src: NodeId, dst: NodeId);

                pub fn edges_to_node(&self, src: NodeId) -> Vec<Edge>;

                pub fn edges_from_node(&self, src: NodeId) -> Vec<Edge>;
            }
        }
    }
}