Table of Contents

Module: GraphUtil ./GraphUtil.py
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:

  • forward BFS will use outgoing edges - backward BFS will use incoming edges

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   
FlowGraphInformer
GraphInformer

Provides information about edges and vertices of a graph.

MSTGraphInformer
ResidualGraphInformer
WeightedGraphInformer

Provides information about weighted edges and vertices of a graph.


Table of Contents

This document was automatically generated on Fri Mar 15 11:15:02 2002 by HappyDoc version 2.0