Table of Contents

Class: Algorithm ./Gato.py

Provides all services necessary to load an algorithm, run it and provide facilities for visualization

Methods   
About
ClearBreakpoints
Continue
GetBreakpointLines
GetInteractiveLines
GetSource
NeededProperties
Open
OpenGraph
OpenSecondaryGraph
PickEdge
PickVertex
ReadPrologOptions
ReadyToStart
SetBreakpoints
SetGUI
Start
Step
Stop
ToggleBreakpoint
Trace
__init__
  About 
About ( self )

Return a HTML-page giving information about the algorithm

  ClearBreakpoints 
ClearBreakpoints ( self )

Clear all breakpoints

  Continue 
Continue ( self )

  GetBreakpointLines 
GetBreakpointLines ( self )

Return lines on which user interaction (e.g., choosing a vertex occurrs.

  GetInteractiveLines 
GetInteractiveLines ( self )

Return lines on which user interaction (e.g., choosing a vertex occurrs.

  GetSource 
GetSource ( self )

Return the algorithms source

  NeededProperties 
NeededProperties ( self,  propertyValueDict )

Check that graph has that value for each property specified in the dictionary propertyValueDict

If check fails algorithm is stopped

Proper names for properties are defined in gProperty

  Open 
Open ( self,  file )

Read in an algorithm from file.

  OpenGraph 
OpenGraph ( self,  file )

Read in a graph from file and open the display

  OpenSecondaryGraph 
OpenSecondaryGraph (
        self,
        G,
        title,
        informer=None,
        )

Read in graph from file and open the the second display

  PickEdge 
PickEdge (
        self,
        default=None,
        filter=None,
        visual=None,
        )

Pick an edge interactively - default: specifies the edge returned when user does not want to select one. If default==None, a random edge not subject to filter will be returned

  • filter: a function which should return a non-None value if the passed edge is acceptable

  • visual is a function which takes the edge as its only argument and cause e.g. some visual feedback

  PickVertex 
PickVertex (
        self,
        default=None,
        filter=None,
        visual=None,
        )

Pick a vertex interactively.

  • default: specifies the vertex returned when user does not want to select one. If default==None, a random vertex not subject to filter will be returned

  • filter: a function which should return a non-None value if the passed vertex is acceptable

  • visual is a function which takes the vertex as its only argument and cause e.g. some visual feedback

  ReadPrologOptions 
ReadPrologOptions ( self,  file )

Prolog files should contain the following variables: - breakpoints = [] a list of line numbers which are choosen as default breakpoints - interactive = [] a list of line numbers which contain interactive commands (e.g., PickVertex) - graphDisplays = 1 | 2 the number of graphDisplays needed by the algorithm - about = """<HTML-code>""" information about the algorithm

  ReadyToStart 
ReadyToStart ( self )

Return 1 if we are ready to run. That is when we user has opened both an algorithm and a graph.

  SetBreakpoints 
SetBreakpoints ( self,  list )

SetBreakpoints is depreciated NOTE: Use breakpoint var in prolog instead.

Set all breakpoints in list: So an algorithm prolog can set a bunch of pre-assigned breakpoints at once

  SetGUI 
SetGUI ( self,  itsGUI )

Set the connection to its GUI

  Start 
Start ( self )

Start an loaded algorithm. It firsts execs the prolog and then starts the algorithm in the debugger. The algorithms globals (i.e., the top-level locals are in a dict we supply and for which we preload the packages we want to make available)

  Step 
Step ( self )

  Stop 
Stop ( self )

  ToggleBreakpoint 
ToggleBreakpoint ( self,  line=None )

If we have a breakpoint on line, delete it, else add it. If no line is passed we ask the DB for it

  Trace 
Trace ( self )

  __init__ 
__init__ ( self )


Table of Contents

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