Type Alias DiGraphAED

Source
pub type DiGraphAED = AdjacencyEdgeDict<{ _ }>;
Expand description

Sparse adjacency list, edge-first directed graph

Aliased Type§

pub struct DiGraphAED { /* private fields */ }

Trait Implementations§

Source§

impl<'a> GraphEngine<'a> for DiGraphAED

Source§

type NeighborIterator = EdgeFirstFindNeighbors<'a>

According to a given vertex, find all neighbor nodes
Source§

type BridgeIterator = EdgeFirstFindBridges<'a>

An iterator over the edges.
Source§

type NodeTraverser = EdgeFirstAllNodes<'a>

An iterator over the nodes.
Source§

type EdgeTraverser = EdgeFirstAllEdges<'a>

An iterator over the edges.
Source§

type BridgeTraverser = EdgeFirstAllBridges<'a>

An iterator over the edges.
Source§

fn graph_kind(&self) -> GraphKind

Check the graph kind, it can be directed or undirected. Read more
Source§

fn get_node(&self, node: NodeID) -> Result<NodeID, GraphError>

Check if the node exists, return the node id if exists. Read more
Source§

fn all_nodes(&'a self) -> Self::NodeTraverser

Traverse all nodes in the graph. Read more
Source§

fn all_neighbors(&'a self, node: NodeID) -> Self::NeighborIterator

Check if the node exists, return the node id if exists. Read more
Source§

fn get_outgoing(&'a self, node: NodeID) -> Self::NeighborIterator

Find all vertices ending at a given point Read more
Source§

fn get_incoming(&'a self, node: NodeID) -> Self::NeighborIterator

Check if the node exists, return the node id if exists. Read more
Source§

fn get_edge(&self, edge: EdgeID) -> Result<EdgeID, GraphError>

Check if the edge exists, return the node id if exists. Read more
Source§

fn all_edges(&'a self) -> Self::EdgeTraverser

Get the edges of the graph. Read more
Source§

fn get_bridge(&self, edge: EdgeID) -> Result<IndeterminateEdge, GraphError>

Source§

fn get_bridges(&'a self, from: NodeID, goto: NodeID) -> Self::BridgeIterator

Give all edges matching the start and end points Read more
Source§

fn all_bridges(&'a self) -> Self::BridgeTraverser

Get the edges of the graph. Read more
Source§

fn count_nodes(&'a self) -> usize

Count the number of nodes in the graph. Read more
Source§

fn count_degree(&'a self, node: usize) -> NodeDegree

Check if the node exists, return the node id if exists. Read more
Source§

fn count_edges(&'a self) -> usize

Count the number of edges in the graph. Read more
Source§

fn size_hint(&self) -> usize

Query the total space occupied by the structure, return 0 if failed to query Read more
Source§

impl MutableGraph for DiGraphAED

Source§

fn insert_node(&mut self, node_id: usize) -> bool

Insert a node without any neighbors (edges). Read more
Source§

fn create_node(&mut self) -> usize

Insert a node without any neighbors (edges). Read more
Source§

fn remove_node_with_edges(&mut self, node_id: usize)

Remove the given node and all edges connected to it. Read more
Source§

fn insert_edge_with_nodes<E: Edge>(&mut self, edge: E) -> EdgeInsertID

Insert edge to graph, if the nodes does not exist, also insert them. Read more
Source§

fn remove_edge<E>(&mut self, edge: E)
where E: Into<EdgeQuery>,

Remove edge by given edge-id or start and end node-id. Read more
Source§

fn remove_node(&mut self, node_id: usize)

Remove the given node. Read more
Source§

fn insert_edge<E>(&mut self, edge: E) -> EdgeInsertID
where E: Edge,

Insert a edge between two nodes. Read more
Source§

fn shrink(&mut self)

Remove invalid edges and nodes to improve the efficiency of subsequent queries.