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
- CompleteGraph represents a graph where every node is connected to every other node.
- Arguments
- DirectedEdge represents an bidirectional edge between two nodes.
- DynamicEdge represents an bidirectional edge between two nodes.
- Arguments
- Arguments
- Arguments
- Arguments
- The error type of a graph operation, see
GraphErrorKind
for more. - Arguments
- Arguments
- Arguments
- Arguments
- 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.
Traits
- Arguments
- A graph that has extra data associated with each node and edge.
- Represent a graph storage, with a set of nodes and edges.
- Arguments
- Arguments
- Defines an additive identity element for
Self
.
Type Definitions
- The result type alias of a graph operation, see
GraphError
&GraphErrorKind
for more.