Crate graph_types
source ·Expand description
Design
graph-types divides the graph into adjacency storage engine and entry storage engine.
Adjacency Storage Engine
The core property of a graph is nodes and edges.
There are many different ways to represent a graph.
Such as adjacency matrix, adjacency list, adjacency set, etc.
The most common one is adjacency list.
Entry Storage Engine
Other properties of the graph are stored in the entry storage engine.
For example weights, labels, colors, etc.
Each of the entry can be stored in different data structures.
For example, weights can be stored in a vector, labels can be stored in a hash map, some complex structures can even be stored in disk or a database.
Structs
- DirectedEdge represents an bidirectional edge between two nodes.
- DynamicEdge represents an bidirectional edge between two nodes.
- Arguments
- The error type of a graph operation, see
GraphErrorKind
for more. - A double-ended iterator over the nodes of a graph.
- UndirectedEdge represents an bidirectional edge between two nodes.
Enums
- Determines the direction between two nodes
- Arguments
- Arguments
- Arguments
- The real error type of a graph operation, it will not be exposed to the user, see
GraphError
for more. - Mark the graph as directed or undirected.
- Represents a node in a graph
- Arguments
Traits
- Marker trait for edges
- A graph that has extra data associated with each node and edge.
- Represent a graph storage, with a set of nodes and edges.
- Mark a graph engine that can add and delete edges or points
- Represents a node in a graph
- Extend the ability to get a value from a graph
Type Definitions
- The result type alias of a graph operation, see
GraphError
&GraphErrorKind
for more.