Imported modules
|
|
from DataStructures import Point2D, VertexLabeling, EdgeLabeling, EdgeWeight, VertexWeight, Queue
from GatoGlobals import *
from Graph import Graph
from string import split
|
Functions
|
|
BFS
Edges
OpenCATBoxGraph
OpenGMLGraph
PairListToDictionary
ParseGML
SaveCATBoxGraph
Vertices
|
|
BFS
|
BFS (
G,
root,
direction='forward',
)
Calculate BFS distances and predecessor without showing animations.
If G is directed, direction does matter:
It uses gInfinity (from GatoGlobals.py) as infinite distance.
returns (dist,pred)
|
|
Edges
|
Edges ( G )
Returns the edges of G. Hide method call
|
|
OpenCATBoxGraph
|
OpenCATBoxGraph ( fileName )
Reads in a graph from file fileName. File-format is supposed
to be from old CATBOX++ (*.cat)
|
|
OpenGMLGraph
|
OpenGMLGraph ( fileName )
Reads in a graph from file fileName. File-format is supposed
to be GML (*.gml)
|
|
PairListToDictionary
|
PairListToDictionary ( l )
|
|
ParseGML
|
ParseGML ( file )
|
|
SaveCATBoxGraph
|
SaveCATBoxGraph ( G, fileName )
Save graph to file fileName in file-format from old CATBOX++ (*.cat)
|
|
Vertices
|
Vertices ( G )
Returns the vertices of G. Hide method call
Syntactic Sugar
|
Classes
|
|
|