Module prepona::storage [−][src]
Storages are structures that graphs use to store information about vertices and edges.
There are two storage types that are supported:
- Adjacency matrix: Is a matrix used to represent a finite graph.
The elements of the matrix indicate whether pairs of vertices are adjacent or not in the graph.
For more info read
AdjMatrix
. - Adjacency list: Is a collection of unordered lists used to represent a finite graph.
Each list describes the set of neighbors of a vertex in the graph.
For more info read
AdjList
Each storage must implement the GraphStorage
trait.
So You can create your own storage and after implementing the GraphStorage
, pass it to the graph to use it as backend storage of the graph.
For a more informed decision regarding to which storage to choose, checkout documentation of each storage and compare their memory usage and time complexity of each operation.
Structs
AdjList |
|
AdjMap |
|
AdjMatrix |
|
Error | Error type returned by storages in |
Enums
ErrorKind | Types of errors that may happen when using a graph storage. |
Traits
GraphStorage | Defines the api that a storage must provide in order to be usable for storing graph data. |
Type Definitions
DiFlowList | An adjacency list that uses |
DiFlowMap | An adjacency map that uses |
DiFlowMat | An adjacency matrix that uses |
DiList | An adjacency list that uses |
DiMap | An adjacency map that uses |
DiMat | An adjacency matrix that uses |
FlowList | An adjacency list that uses |
FlowMap | An adjacency map that uses |
FlowMat | An adjacency matrix that uses |
List | An adjacency list that uses |
Map | An adjacency map that uses |
Mat | An adjacency matrix that uses |