Module graph

Module graph 

Source
Expand description

Generic graph traits used as abstractions within this library. Everywhere a graph is used as a function argument or return type within this crate, it is required to implement the graph::Graph trait and possibly some of its trait extensions, depending on the specific functionalities required by each API.

This approach theoretically allows swapping out storage backends for graphs, and allows more implementation flexibility for the return type of graph operations.

However, petgraphs Graph type is currently the only storage backend supported by the implementations in this crate itself.

Traits§

Graph
Graph is a generic trait specifying the functionality that must be implemented by Graph storage backends used for Querying.
GraphReadWriter
Trait to serialize and deserialize a given Graph to a file. The file format depends on the graph type being used and can only be assumed compatible with the same graph type.
VizDotGraph
The VizDotGraph trait allows a given Graph to be printed to the GraphViz format.

Functions§

incoming_nodes
Convenience Method to directly access the predecessor nodes of node n in Graph g.
outgoing_nodes
Convenience Method to directly access the successor nodes of node n in Graph g.