Expand description
The graph traits.
The traits are roughly split up by different access types:
- immutable reference (
ImmutableGraphContainer
) - mutable reference (
MutableGraphContainer
) - immutable reference that must outlive the return value (
TraversableGraph
)
As it happens, the access types match well to common graph use cases, i.e. queries for nodes and edges, adding and removing nodes and edges as well as iterating over the neighbors of a node.
Modules§
- subgraph
- A set of traits for subgraphs. A subgraph is a graph that is backed by an actual graph implementation, but that filters out some nodes or edges.
Structs§
- Edge
- An edge represented as a pair of node indices.
- Neighbor
- The neighbor of a node, given as the edge used to reach the neighbor node as well as the neighbor node itself.
Enums§
- Node
OrEdge - An enum encoding an index that can either be a node index or an edge index.
Traits§
- Dynamic
Graph - A graph implementing all common graph traits, including those requiring mutable access. This is a useful shortcut for generic type bounds when the graph should be mutated.
- Graph
Base - Contains the associated types of a graph.
- Immutable
Graph Container - A container that contains a set of nodes and edges.
- Mutable
Graph Container - A container that allows adding and removing nodes and edges.
- Navigable
Graph - A graph that can be navigated, i.e. that can iterate the neighbors of its nodes.
- Static
Graph - A graph implementing all common graph traits that do not require mutable access. This is a useful shortcut for generic type bounds when the graph should not be mutated.
- Walkable
Graph - A helper trait to get the correct walk type from a graph. This is the factory pattern, where a graph is a factory for walks.