úÎË3¿ià      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª« ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á  Safe XThe Degree Sequence of a DGraph) is a list of pairs (Indegree, Outdegree)Safe6;=VMCA%Edge attributes that represent labels&Edge attributes that represent weights $Directed Arc with attribute of type e between to Vertices of type v 'Undirected Edge with attribute of type e between to Vertices of type vTypes that represent edges The main  instances are   for undirected edges and   for directed edges.&Retrieve the origin vertex of the edge+Retrieve the destination vertex of the edge"Retrieve the attribute of the edge2Convert an edge to a pair discarding its attribute7Convert a pair to an edge, where it's attribute is unitKConvert an edge to a triple, where the 3rd element it's the edge attributeConvert a triple to an edgeTell if an edge is a loopAn edge forms a loop- if both of its ends point to the same vertexTypes that behave like graphs The main  instances are UGraph and DGraphŽ. The functions in this class should be used for algorithms that are graph-directionality agnostic, otherwise use the more specific ones in UGraph and DGraph:The Empty (order-zero) graph with no vertices and no edgesRetrieve the order of a graphThe order% of a graph is its number of verticesRetrieve the size of a graphThe size" of a graph is its number of edgesDensity of a graphThe densityX of a graph is the ratio of the number of existing edges to the number of posible edges$Retrieve all the vertices of a graphRetrieve the edges of a graph6Retrieve the edges of a graph, ignoring its attributes$Tell if a vertex exists in the graph !Tell if two vertices are adjacent!*Retrieve the adjacent vertices of a vertex"Same as !$ but gives back the connecting edges#Same as !c but gives back only those vertices for which the connecting edge allows the vertex to be reached..For an undirected graph this is equivalent to !u, but for the case of a directed graph, the directed arcs will constrain the reachability of the adjacent vertices.$Same as #$ but gives back the connecting edges%*Total number of incident edges of a vertex&(Degrees of a all the vertices in a graph'Maximum degree of a graph(Minimum degree of a graph)Average degree of a graph*ZInsert a vertex into a graph. If the graph already contains the vertex leave it untouched+oInsert many vertices into a graph. New vertices are inserted and already contained vertices are left untouched,#Tell if an edge exists in the graph-'Retrieve the incident edges of a vertex.@Retrieve the incident edges of a vertex, ignoring its attributes/-Get the edge between to vertices if it exists0”Insert an edge into a graph. The involved vertices are inserted if don't exist. If the graph already contains the edge, its attribute gets updated1Same as 0 but for multiple edges2Same as 0; but insert edge pairs in graphs with attribute less edges3Same as 2 for multiple edges4^Remove a vertex from a graph if present. Every edge incident to this vertex also gets removed5Same as 4 but for multiple vertices6QRemove an edge from a graph if present. The involved vertices are left untouched7Same as 6 but for multiple edges8PRemove the edge from a graph if present. The involved vertices also get removed91Retrieve the isolated vertices of a graph, if any:Tell if a graph is simple A graph is simple if it has no loops;Union of two graphs<Intersection of two graphs=;Convert a graph to an adjacency list with vertices in type v and edge attributes in e>ZConstruct a graph from an adjacency list with vertices in type /v and edge attributes in e?9Get the adjacency binary matrix representation of a graph@GGenerate a graph of Int vertices from an adjacency square binary matrixA'Construct an attribute less undirected   between two verticesB%Construct an attribute less directed   between two verticesÃEdges generatorC8Convert a triple to a pair by ignoring the third elementD8Convert a pair to a triple where the 3rd element is unitE)Get the origin vertex from an edge tripleF.Get the destination vertex from an edge tripleG%Get the attribute from an edge tripleHTwo  Ls are equal if they point to the same vertices, regardless of the directionMTwo  Ps are equal if they point to the same vertices, and the directions are the sameB >=;<: ,!"#$%&'()*+-./0123456789?@ABCDEFGB !"#$%&'()*+,-./0123456789:;<=>?@ AB CDEFG   ) !"#$%&'()*+,-./0123456789:;<=>?@SafeRi`<breadh-first-search vertices starting at a particular vertexa;depth-first-search vertices starting at a particular vertex`a`aNoneVVjb/Read a graph from a CSV file of adjacency listsThe CSV lines: "1,2,3,4" "2,1,4,5"/produce the graph with this list of edge pairs: 0[(1, 2), (1, 3), (1, 4), (2, 1), (2, 4), (2, 5)]cSame as b) but rise an exception when parsing failsbcbc Safe^yÄEach vertex maps to a Ä' value so it can poit to other verticesÅpInsert a link directed to *v* with attribute *a* | If the connnection already exists, the attribute is replacedÆ Get the links for a given vertexÇGet  6s from an association list of vertices and their linksÈGet  6s from an association list of vertices and their linksÉžO(log n) Associate the specified value with the specified key in this map. | If this map previously contained a mapping for the key, leave the map | intact.ÄÅÆÇÈÉSafe%6;Vk@ d Undirected Graph of Vertices in v and Edges with attributes in eeInsert an undirected   into a d{The involved vertices are inserted if they don't exist. If the graph already contains the Edge, its attribute gets updatedfSame as e but for a list of  sgRemove the undirected   from a d6 if present. The involved vertices are left untouchedhSame as g but for a list of  siRemove the undirected   from a d4 if present. The involved vertices also get removedj Retrieve the  s of a dkTell if an undirected   exists in the graphlRetrieve the incident   s of a Vertexm Convert a d to a list of  s discarding isolated verticesNote that because mA discards isolated vertices: > fromEdgesList . toEdgesList /= idn Construct a d from a list of  soPretty print a d defghijklmno defghijklmnodÊËÌSafe6VŽ{Directed Graph of Vertices in v and Arcs with attributes in e|Insert a directed   into a {zThe involved vertices are inserted if they don't exist. If the graph already contains the Arc, its attribute gets updated}Same as | but for a list of  s~Remove the directed   from a {6 if present. The involved vertices are left untouchedSame as ~ but for a list of  s€Remove the directed   from a {4 if present. The involved vertices also get removed Retrieve the  s of a {‚Tell if a directed   exists in the graphƒRetrieve the inbounding   s of a Vertex„Retrieve the outbounding   s of a Vertex…Retrieve the incident   s of a VertexThe incidentL arcs of a vertex are all the inbounding and outbounding arcs of the vertex†Indegree of a vertexThe indegree) of a vertex is the number of inbounding   s to a vertex‡Outdegree of a vertexThe  outdegree* of a vertex is the number of outbounding  s from a vertexˆ#Indegrees of all the vertices in a {‰#Outdegree of all the vertices in a {Š Tell if a { is symmetricA directed graph is  symmetric if all of its  s are bi-directed‹ Tell if a { is orientedA directed graph is oriented if there are none bi-directed  sNote: This is not the opposite of ŠŒ Tell if a { is balancedA directed graph is balanced when its indegree = outdegree Tell if a { is regularA directed graph is regularE when all of its vertices have the same number of adjacent vertices AND when the indegree and  outdegree) of each vertex are equal to each other.ŽTell if a vertex is a sourceA vertex is a source when its  indegree = 0Tell if a vertex is a sinkA vertex is a sink when its  outdegree = 0Tell if a vertex is internal A vertex is internal when its neither a source nor a sink‘Get the transpose of a {The  transposeR of a directed graph is another directed graph where all of its arcs are reversed’Convert a directed { to an undirected UGraph by converting all of its  s into  s“ Convert a { to a list of  s discarding isolated verticesNote that because “ discards isolated vertices: fromArcsList . toArcsList /= id” Construct a { from a list of  s•Pretty print a {{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•{ÍÎÏSafe“è¡cTell if two graphs are isomorphic TODO: check first: same number of vertices, same number of edges£ Tell if a d is regularAn undirected graph is regular# if each vertex has the same degree¤ Tell if a { is regularA directed graph is regular4 if each vertex has the same indegree and outdegree¡¢£¤¡¢£¤SafeVœ×¥1Generate a random ErdQs Rényi G(n, p) model graph¦¥ convinience d generation function§¥ convinience { generation function¨5Generate a random graph for all the vertices of type v) in the list, random edge attributes in eh within given bounds, and some existing probability for each possible edge as per the ErdQs Rényi model©Same as ¨ but uses attributeless edgesª"Generate a random adjacency matrixUseful for use with @Ð:Insert and edge between vertices if the probability is metÑ2Bound a real value as probability value [0.0, 1.0]¥¦§¨©ª¥¦§¨©ª SafeV­Y«-Tell if two vertices of a graph are connectedTwo vertices are  connectedd if it exists a path between them. The order of the vertices is relevant when the graph is directed¬ Opposite of «­Tell if a vertex is isolated A vertex is isolated? if it has no incident edges, that is, it has a degree of zero®Tell if a graph is connectedAn undirected graph is  connectedR when there is a path between every pair of vertices FIXME: Use a O(n) algorithm¯Tell if a graph is bridgeless A graph is  bridgelessp if it has no edges that, when removed, split the graph in two isolated components FIXME: Use a O(n) algorithm° Tell if a d is orientableAn undirected graph is  orientable7 if it can be converted into a directed graph that is strongly connected (See ²)± Tell if a { is weakly connectedA directed graph is weakly connected( if the underlying undirected graph is  connected² Tell if a { is strongly connectedA directed graph is strongly connected: if it contains a directed path on every pair of vertices«¬­®¯°±²«¬­®¯°±² Safeº£³ The Degree Sequence of a simple d3 is a list of degrees of the vertices in the graphUse ´% to construct a valid Degree Sequence´ Construct a ³> from a list of degrees. Negative degree values get discardedµGet the ³ of a simple d. If the graph is not simple (see :) the result is Nothing¶ Tell if a ³ is a Graphical SequenceA Degree Sequence is a Graphical Sequence if a corresponding d0 for it exists. Uses the Havel-Hakimi algorithm· Tell if a ³ is a Directed GraphicA Directed Graphic" is a Degree Sequence for which a DGraphG exists TODO: Kleitman Wang | Fulkerson Chen Anstee theorem algorithms¸ Tell if a ³Y holds the Handshaking lemma, that is, if the number of vertices with odd degree is even¹Get the corresponding d of a ³ . If the ³ is not graphical (see ¶) the result is Nothing³´µ¶·¸¹³´µ¶·¸¹³ÒÓ None¿3½Plot an undirected d¾Same as ½ but render edge attributes¿Plot an undirected d to a PNG image fileÀPlot a directed {ÁSame as À but render edge attributesÂPlot a directed { to a PNG image fileÔ Label edgesÕ Label edgesÖDirected Label edges½¾¿ÀÁ½À¾Á¿Â×   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžyŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³ ´ µ ¶ · ¸ ¹ º »  ¼ ½ ¾ ¿ À Á    Â Ã Ä Å Æ ÇÈ É Ê Ë Ì Í ÎnÏÐ…ÏÑÒÓ   Ô Õ Ö×'graphite-0.9.8.0-77SDGcW5reL5RHz98hW0ss Data.Graph.DGraph.DegreeSequenceData.Graph.TypesData.Graph.TraversalData.Graph.ReadData.Graph.UGraphData.Graph.DGraphData.Graph.MorphismsData.Graph.GenerationData.Graph.Connectivity Data.Graph.UGraph.DegreeSequenceData.Graph.VisualizeData.Graph.InternalDegreeSequenceunDegreeSequence$fEqDegreeSequence$fOrdDegreeSequence$fShowDegreeSequenceLabeledlabelWeightedweightArcEdgeIsEdge originVertexdestinationVertex attributetoPairfromPairtoTriple fromTripleisLoopGraphemptyordersizedensityvertices edgeTriples edgePairscontainsVertex areAdjacentadjacentVerticesadjacentVertices'reachableAdjacentVerticesreachableAdjacentVertices' vertexDegreedegrees maxDegree minDegree avgDegree insertVertexinsertVerticescontainsEdgePairincidentEdgeTriplesincidentEdgePairs edgeTripleinsertEdgeTripleinsertEdgeTriplesinsertEdgePairinsertEdgePairs removeVertexremoveVerticesremoveEdgePairremoveEdgePairsremoveEdgePairAndVerticesisolatedVerticesisSimpleunion intersectiontoListfromListtoAdjacencyMatrixfromAdjacencyMatrix<->--> tripleToPair pairToTripletripleOriginVertextripleDestVertextripleAttribute$fEqEdge $fFunctorEdge$fArbitraryEdge $fIsEdgeEdge $fNFDataEdge$fEqArc $fFunctorArc$fArbitraryArc $fIsEdgeArc $fNFDataArc $fWeighted(,)$fWeightedDouble$fWeightedFloat $fWeightedInt $fLabeled(,) $fLabeled[] $fShowEdge $fReadEdge $fOrdEdge $fGenericEdge $fShowArc $fReadArc$fOrdArc $fGenericArc bfsVertices dfsVerticesfromCsvfromCsv'UGraph insertEdge insertEdges removeEdge removeEdgesremoveEdgeAndVerticesedges containsEdge incidentEdges toEdgesList fromEdgesList prettyPrint $fGraphUGraph$fArbitraryUGraph$fNFDataUGraph$fFoldableUGraph$fFunctorUGraph$fSemigroupUGraph$fMonoidUGraph $fReadUGraph $fShowUGraph $fEqUGraph$fGenericUGraphDGraph insertArc insertArcs removeArc removeArcsremoveArcAndVerticesarcs containsArcinboundingArcsoutboundingArcs incidentArcsvertexIndegreevertexOutdegree indegrees outdegrees isSymmetric isOriented isBalanced isRegularisSourceisSink isInternal transpose toUndirected toArcsList fromArcsList$fArbitraryDGraph $fGraphDGraph$fNFDataDGraph$fFoldableDGraph$fFunctorDGraph$fSemigroupDGraph$fMonoidDGraph $fReadDGraph $fShowDGraph $fEqDGraph$fGenericDGraph areIsomorphic isomorphism isURegular isDRegular erdosRenyi erdosRenyiU erdosRenyiDrndGraph rndGraph'rndAdjacencyMatrix areConnectedareDisconnected isIsolated isConnected isBridgeless isOrientableisWeaklyConnectedisStronglyConnecteddegreeSequencegetDegreeSequenceisGraphicalSequenceisDirectedGraphicholdsHandshakingLemmafromGraphicalSequence plotUGraphplotUGraphEdged plotUGraphPng plotDGraphplotDGraphEdged plotDGraphPng arbitraryEdgeLinks insertLinkgetLinks linksToArcs linksToEdges hashMapInsert_sizeunUGraphunDGraphinsertFlippedEdge probabilitytoUndirectedDot toDirectedDotsensibleDotParams