module documentation

Provides graph instances used in the book's examples.

Function figure_14_1_3 Return the unweighted, directed graph from Figure 14.1.3 of DSAP.
Function figure_14_3_1 Return the unweighted, directed graph from Figure 14.3.1 of DSAP.
Function figure_14_3_2 Return the unweighted, undirected graph from Figure 14.3.2 of DSAP.
Function figure_14_4_1 Return the unweighted, directed graph from Figure 14.4.1 of DSAP.
Function figure_14_5_1 Return the unweighted, directed graph from Figure 14.5.1 of DSAP.
Function figure_14_6_1 Return the weighted, undirected graph from Figure 14.6.1 of DSAP.
Function figure_14_6_2 Return the weighted, undirected graph from Figure 14.16.2 of DSAP.
Function graph_from_edgelist Make a graph instance based on a sequence of edge tuples.
def figure_14_1_3():

Return the unweighted, directed graph from Figure 14.1.3 of DSAP.

def figure_14_3_1():

Return the unweighted, directed graph from Figure 14.3.1 of DSAP.

def figure_14_3_2():

Return the unweighted, undirected graph from Figure 14.3.2 of DSAP.

This is the same graph as in Figure 14.3.3.

def figure_14_4_1():

Return the unweighted, directed graph from Figure 14.4.1 of DSAP.

def figure_14_5_1():

Return the unweighted, directed graph from Figure 14.5.1 of DSAP.

This is the same graph as Figure 14.5.2.

def figure_14_6_1():

Return the weighted, undirected graph from Figure 14.6.1 of DSAP.

def figure_14_6_2():

Return the weighted, undirected graph from Figure 14.16.2 of DSAP.

This is the same graph as in Figures 14.7.2 and 14.7.3.

def graph_from_edgelist(E, directed=False):

Make a graph instance based on a sequence of edge tuples.

Edges can be either of from (origin,destination) or (origin,destination,element). Vertex set is presume to be those incident to at least one edge.

vertex labels are assumed to be hashable.