Did I find the right examples for you? yes no

All Samples(11)  |  Call(0)  |  Derive(0)  |  Import(11)
Graphs.py

Various simple functions for graph input.

Each function's input graph G should be represented in such a way that "for v in G" loops through the vertices, and "G[v]" produces a list of the neighbors of v; for instance, G may be a dictionary mapping each vertex to its neighbor set.

D. Eppstein, April 2004.

src/p/y/pystream-HEAD/lib/PADS/Bipartite.py   pystream(Download)
from sets import Set
from Biconnectivity import BiconnectedComponents
import Graphs
import DFS
 

src/p/a/PADS-0.0.20131119/pads/Bipartite.py   PADS(Download)
import unittest
from Biconnectivity import BiconnectedComponents
import Graphs
import DFS