Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(26)  |  Call(16)  |  Derive(4)  |  Import(6)
Simple Wrapper class for any mapping of vertices to values.
E.g.,

- strings (for labels)
- Point2D (for embeddings)


XXX Historical artefact: should be removed (or be a synonim of UserDict)

src/g/a/Gato-1.1.2/GraphUtil.py   Gato(Download)
from GatoGlobals import *
import Graph
from DataStructures import Point2D, VertexLabeling, EdgeLabeling, EdgeWeight, VertexWeight, Queue
import logging
log = logging.getLogger("Gato")
def OpenCATBoxGraph(_file):
    """ Reads in a graph from file fileName. File-format is supposed
        to be from old CATBOX++ (*.cat) """
    G = Graph.Graph()
    E = VertexLabeling()
    W = EdgeWeight(G)
    L = VertexLabeling()
                G.vertexWeights[i][v] = w
 
            E[v] = Point2D(x,y)
 
        if lineNr == lastVertexLineNr + 1: # Read Nr of edges
 
    for v in G.vertices:
        L[v] = v
 
    G.embedding = E

src/g/a/Gato-1.1.2/AnimatedDataStructures.py   Gato(Download)
################################################################################
from GatoGlobals import AnimationParameters, gInfinity, NoSuchVertexError, NoSuchEdgeError  
from DataStructures import VertexLabeling, Queue, Stack, PriorityQueue
from Graph import SubGraph
import copy
class VisibleVertexLabeling(VertexLabeling):
    def __init__(self, theAnimator):
        VertexLabeling.__init__(self)
        self.A = theAnimator
 
class AnimatedVertexLabeling(VertexLabeling):
    """ Visualizes changes of values of the VertexLabeling
        by changing vertex colors appropriately.
 
        E.g.,
class BlinkingVertexLabeling(VertexLabeling):
    """ Visualizes changes of values of the VertexLabeling
        by blinking vertices """
 
    def __init__(self, theAnimator):
class AnimatedPredecessor(VertexLabeling):
    """ Animates a predecessor array by 
 
        - coloring edges (pred[v],v) 'red' 
        - coloring edges (pred[v],v) 'grey' if the value of

src/g/a/Gato-1.1.2/Graph.py   Gato(Download)
 
from GatoGlobals import *
from DataStructures import Point2D, VertexLabeling, EdgeLabeling, EdgeWeight
import GraphUtil #import ConnectedComponents, FindBipartitePartitions 
 
        self.invAdjLists      = {}   # Inverse Adjazenzlisten
        self.highVertexID     = 0    # INTERNAL
        self.embedding        = VertexLabeling() # 2D-Positions
        self.labeling         = VertexLabeling() # Names of vertices
        self.edgeWeights      = {}   # Dictionary of edge labellings

src/g/a/Gato-1.1.2/GraphDisplay.py   Gato(Download)
from GatoUtil import orthogonal
from GatoDialogs import AutoScrollbar
from DataStructures import Point2D, VertexLabeling, EdgeLabeling
import os
import colorsys
    def __init__(self):
        self.hasGraph = 0
 
        # Canvas items for vertices and edges 
        self.drawVertex = VertexLabeling()
        self.drawEdges = EdgeLabeling()
        self.drawLabel = VertexLabeling()
        self.vertexAnnotation = VertexLabeling()
        self.DeleteEdgeAnnotations()
        self.canvas.delete("all") # Remove whatever is left
        self.drawVertex = VertexLabeling()
        self.drawEdges = EdgeLabeling()
        self.drawLabel = VertexLabeling()

src/g/a/Gato-1.1.2/ObjectGraph.py   Gato(Download)
 
from GatoGlobals import *
from DataStructures import Point2D, VertexLabeling, EdgeLabeling, EdgeWeight
#from math import log
 

src/g/a/Gato-1.1.2/AnimatedAlgorithms.py   Gato(Download)
################################################################################
import GatoGlobals
from DataStructures import VertexLabeling, Queue
from AnimatedDataStructures import *
#from GraphDisplay import GraphDisplay