[][src]Module rs_graph::traits

Traits for graph data structures.

The traits for graph data structures provide an additional level of information about (the edges of) the graph. There are three levels:

  1. Graph: an undirected graph, edges have no defined source or sink.
  2. Digraph: a directed graph, each edge has a designated source and a designated sink node. Furthermore, there is the concept of "outgoing" and "incoming" edges. A Digraph is also a Graph, which basically means ignoring the direction information of the edges.
  3. Network: a network is a directed graph, but each edge is actually a pair of edges: the normally directed edge and its reverse edge. Edge and reverse edge are considered equal for all purposes of a digraph (e.g. source and sink node are always source and sink of the forward edge), but the additional "reverse" information can be obtained by the methods of Network. Furthermore, if the network is an IndexNetwork, a BiEdgeVec can be used to store different values for edges and the reverse edges (in contrast, an EdgeVec always contains the same value for an edge and its reverse edge).

Re-exports

pub use crate::vec::IndexBiEdgeSlice;
pub use crate::vec::IndexEdgeSlice;
pub use crate::vec::IndexNodeSlice;
pub use crate::vec::IndexBiEdgeVec;
pub use crate::vec::IndexEdgeVec;
pub use crate::vec::IndexNodeVec;

Traits

BiDirected

A network with list access to the incident edges.

BiIndexable

An item that has a second bi-index.

Digraph

A trait for general directed, sized graphs.

Directed

A graph with list access to directed incident edges.

Graph

A trait for general undirected, sized graphs.

GraphSize

A (finite) graph with a known number of nodes and edges.

GraphType

Base information of a graph.

IndexDigraph

A Digraph that is also an IndexGraph.

IndexGraph

Associates nodes and edges with unique ids.

IndexNetwork

Associates edges with unique ids for forward and backward edge.

Indexable

An item that has an index.

Network

A trait for general sized networks.

NumberedDigraph

Marker trait for digraphs with directly numbered nodes and edges.

NumberedGraph

Marker trait for graphs with directly numbered nodes and edges.

NumberedNetwork

Marker trait for networks with directly numbered nodes and edges.

Undirected

A graph with list access to undirected incident edges.