;ò òiýDc@skdkTdklZlZlZlZdkZeidƒZdfd„ƒYZ de fd„ƒYZ dS((s*(sPoint2DsVertexLabelings EdgeLabelings EdgeWeightNsGraph.pysGraphcBs©tZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zdd„Zd„Z d „Z!d!„Z"d"„Z#d#„Z$d$„Z%d%„Z&d&„Z'd'„Z(d(„Z)d)„Z*dd*„Z+d+„Z,d,„Z-d-„Z.d.„Z/RS(/sú Provides a mathematical graph object consisting of vertices and (directed) edges connecting those vertices. Graphs have - a labeling for vertices allowing to specify names - an embedding of vertices into 2D-space - one or more sets of edge weights Vertices are specified via id (integer number) and edges via (tail,head)-tuples NOTE: ids are supposed to be consecutive and ranging from 0 to G.Order() - 1 !!! Use the labeling to *display* other numbers for vertices. At least one set of edge weights is assumed to exist and accessible as self.edgeWeights[0]; self.euclidian and Euclidify refer to this self.edgeWeights[0] cCs­d|_d|_d|_g|_h|_h|_d|_tƒ|_ tƒ|_ h|_ t |ƒ|i d|iƒ}|ii|ƒg|i|ÔsN(svsfsmapsselfs invAdjLists(sselfsvsf((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysInEdgesÒs cCs$|d„}t||i|ƒSdS(s Returns edges (v,*) cCs ||fS(N(svertexsx(sxsvertex((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysÚsN(svsfsmapsselfsadjLists(sselfsvsf((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysOutEdgesØs cCs|i|ƒ|i|ƒSdS(s Returns edges (v,*) and (*,v) N(sselfsInEdgessvsOutEdges(sselfsv((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pys IncidentEdgesÞscCs5g}x$|iD]}||i|ƒ}qW|SdS(s Returns all edges N(stmpsselfsverticessvsOutEdges(sselfstmpsv((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysEdgesãs  cCs |iSdS(s Returns all edges N(sselfsvertices(sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysVerticesêscCs,x%|iD]}|GdG|i|GHq WdS(s Debugging only s -- N(sselfsverticessvsadjLists(sselfsv((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysprintMyîs cCs|id|_|iSdS(s( *Internal* returns next free vertex id iN(sselfs highVertexID(sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysGetNextVertexIDôscCst|iƒSdS(s, Returns order i.e., the number of vertices N(slensselfsvertices(sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysOrderúscCs |iSdS(s' Returns size i.e., the number of edge N(sselfssize(sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysSizeÿscCsE|iot|i|ƒSn#t|i|ƒt|i|ƒSdS(s® Returns the degree of the vertex v, which is - the number of incident edges in the undirect case - the number of outgoing edges in the directed case N(sselfsdirectedslensadjListssvs invAdjLists(sselfsv((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysDegrees cCs'|iot|i|ƒSntSdS(s8 Returns the number of incoming edges for direct graphs N(sselfsdirectedslens invAdjListssvsNone(sselfsv((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysInDegrees cCs'|iot|i|ƒSntSdS(s8 Returns the number of incoming edges for direct graphs N(sselfsdirectedslensadjListssvsNone(sselfsv((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pys OutDegrees cCs |iSdS(s- Returns 1 if the graph is euclidian, 0 else N(sselfs euclidian(sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pys QEuclidianscCs |iSdS(s, Returns 1 if the graph is directed, 0 else N(sselfsdirected(sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pys QDirected#sicCsqtƒ|_|iƒ}t|i|ii ƒƒ}x6|D].}|dd|i||||i|scCs||i||

No information available

N((sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysAboutˆs(0s__name__s __module__s__doc__s__init__s AddVertexs DeleteVertexsQVertexsAddEdges DeleteEdgesEdgesQEdges QEdgeWidths EdgeWidths Neighborhoods InNeighborss OutNeighborssInOutNeighborssInEdgessOutEdgess IncidentEdgessEdgessVerticessprintMysGetNextVertexIDsOrdersSizesDegreesInDegrees OutDegrees QEuclidians QDirectedsCalculateWidthFromWeightsNrOfEdgeWeightss SetEdgeWeights GetEdgeWeightsNrOfVertexWeightssSetVertexWeightsGetVertexWeights GetLabelings SetLabelings GetEmbeddings SetEmbeddings Euclidifys IntegerizesUndirects SetPropertysPropertysAbout(((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysGraph1s\                                       sSubGraphcBsqtZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z RS( sJ Provides a subgraph, i.e., a subset of the vertices and edges of a specified graph Vertices are specified via ids from its supergraph and edges via (tail,head)-tuples It also keeps track of the subgraphs total weight (= sum of edge weights) for weights with weightID == 0 cCs_ti|ƒ||_|ii|_|ii|_|ii|_|ii|_d|_ dS(Ni( sGraphs__init__sselfsGs superGraphs embeddingslabelings edgeWeightssdirecteds totalWeight(sselfsG((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pys__init__ s  cCsIy.|ii|ƒg|i| GetNextVertexID should never have been calledN(slogserror(sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysGetNextVertexIDóscCs |iSdS(s> Returns the total weight (= sum of edge weights) of subgraph N(sselfs totalWeight(sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysWeight÷scCs|iiSdS(s3 Returns 1 if the super graph is euclidian, 0 else N(sselfs superGraphs euclidian(sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pys QEuclidianüscCs|iiSdS(s1 Returns 1 if the super graph is directed, 0 elseN(sselfs superGraphsdirected(sself((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pys QDirectedscCsx||ij p||ij odSn|idjo||i|jSn&||i|jp||i|jSdS(s* Returns 1 if (tail,head) is an edge in G iiN(stailsselfsverticessheadsdirectedsadjLists(sselfstailshead((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysQEdges "(s__name__s __module__s__doc__s__init__s AddVertexsAddEdges AddSubGraphs DeleteEdgesClearsGetNextVertexIDsWeights QEuclidians QDirectedsQEdge(((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pysSubGraph”s       ( s GatoGlobalssDataStructuressPoint2DsVertexLabelings EdgeLabelings EdgeWeightsloggings getLoggerslogsGraphsSubGraph(sVertexLabelingsloggingslogsSubGraphsGraphs EdgeLabelings EdgeWeightsPoint2D((s2/mnt/gmirror/ports/math/py-gato/work/Gato/Graph.pys?%s  ÿd