Module rs_graph::linkedlistgraph
source · Expand description
A linked-list based graph implementation.
This is an efficient default implementation of a graph.
LinkedListGraph
provides directed arc access (i.e. implements
Network
).
Node and edge data are stored in an array (Vec), nodes and edges
are identified by indices. Forward edges have even indices,
backward edges have the odd indices directly following the
corresponding forward edge. The external edge index is the edge
index shifted right by one bit (the lsb is removed), but a user
should not rely on that. The node and edge indices can be
retrieved using the IndexGraph
and IndexNetwork
traits.
LinkedListGraph
takes additional parameters for node, edge
and biedge attributes, thus, it implements NodeAttributes
,
EdgeAttributes
and BiEdgeAttributes
.
LinkedListGraph
can be constructed (it implements Builder
),
but nodes and edges cannot be removed.
Structs
- Edge of a linked list graph.
- An iterator over all edges of a linked list graph.
- The linked list based graph data structure.
- A builder for a LinkedListGraph.
- Graph iterator over edges incident with some node.
- Node of a linked list graph.
- A graph iterator over all nodes of a linked list graph.
- A graph iterator over edges leaving a node.
Type Aliases
- A graph iterator over edges entering a node.
- A graph iterator over directed edges incident with some node.