úΆ<èy      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxSafe9;T4Labeled Edge attributes | Useful for graph plottingJWeighted Edge attributes | Useful for computing some algorithms on graphsEach vertex maps to a ' value so it can poit to other vertices$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 v Edges generator Construct an undirected  between two vertices Construct a directed  between two vertices  Convert an , to an ordered pair discarding its attribute  Convert an . to an unordered pair discarding its attributepInsert a link directed to *v* with attribute *a* | If the connnection already exists, the attribute is replaced Get the links for a given vertexGet 6s from an association list of vertices and their linksGet 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.To Qs are equal if they point to the same vertices, and the directions | is the sameTo Ns are equal if they point to the same vertices, regardless of the | direction    Safe9;T# Undirected Graph of Vertices in v and Edges with attributes in e&Generate a random # of n vertices'The Empty (order-zero) # with no vertices and no edges(O(log n) Insert a vertex into a #F | If the graph already contains the vertex leave the graph untouched)O(n) Remove a vertex from a # if present | Every ( incident to this vertex is also removed* O(m*log n) Insert a many vertices into a #O | New vertices are inserted and already contained vertices are left untouched+O(log n) Insert an undirected  into a #z | The involved vertices are inserted if don't exist. If the graph already | contains the Edge, its attribute is updated, O(m*log n) Insert many directed  s into a # | Same rules as + are applied-O(log n) Remove the undirected  from a #7 if present | The involved vertices are left untouched.Same as -" but the edge is an unordered pair/O(log n) Remove the undirected  from a #5 if present | The involved vertices are also removed0Same as /" but the edge is an unordered pair1O(n) Retrieve the vertices of a #2O(n) Retrieve the order of a # | The order% of a graph is its number of vertices3O(n*m) Retrieve the size of a # | The size) of an undirected graph is its number of s4O(n*m) Retrieve the s of a #5Same as 4I but the edges are unordered pairs, and their attributes | are discarded6O(log n)% Tell if a vertex exists in the graph7O(log n) Tell if an undirected  exists in the graph8Same as 7" but the edge is an unordered pair9Retrieve the incident  s of a Vertex:0Degree of a vertex | The total number incident  s of a vertex;#Degrees of a all the vertices in a #<Maximum degree of a #=Minimum degree of a #> Tell if an  forms a loop | An < forms a loop with both of its ends point to the same vertex? Tell if a # is simple | A # is simple& if it has no multiple edges nor loops@ Tell if a #& is regular | An Undirected Graph is regularF when all of its vertices have the same | number of adjacent verticesAGenerate a directed #3 of Int vertices from an adjacency | square matrixB6Get the adjacency matrix representation of a directed #!#$%&'()*+,-./0123456789:;<=>?@ABC #$%&'()*+,-./0123456789:;<=>?@AB!#$%C&'()*+,-./0123456789:;<=>?@AB#$%&'()*+,-./0123456789:;<=>?@ABCNoneFPlot an undirected Graph to a PNG image fileGSame as F# but open the resulting image with xdg-openFGyz{FGFGFGyz{SafeT&HThe Degree Sequence un a I) is a list of pairs (Indegree, Outdegree)IDirected Graph of Vertices in v and Arcs with attributes in eLThe Empty (order-zero) I with no vertices and no arcsMO(log n) Insert a vertex into a IF | If the graph already contains the vertex leave the graph untouchedNO(n) Remove a vertex from a I if present | Every ( incident to this vertex is also removedO O(m*log n) Insert a many vertices into a IO | New vertices are inserted and already contained vertices are left untouchedPO(log n) Insert a directed  into a Iy | The involved vertices are inserted if don't exist. If the graph already | contains the Arc, its attribute is updatedQ O(m*log n) Insert many directed  s into a I | Same rules as P are appliedRO(log n) Remove the directed  from a I7 if present | The involved vertices are left untouchedSSame as R but the arc is an ordered pairTO(log n) Remove the directed  from a I5 if present | The involved vertices are also removedUSame as T but the arc is an ordered pairVO(n) Retrieve the vertices of a IWO(n) Retrieve the order of a I | The order% of a graph is its number of verticesXO(n*m) Retrieve the size of a I | The size& of a directed graph is its number of sYO(n*m) Retrieve the s of a IZSame as YF but the arcs are ordered pairs, and their attributes are | discarded[O(log n)% Tell if a vertex exists in the graph\O(log n) Tell if a directed  exists in the graph]Same as \ but the arc is an ordered pair^Retrieve the inbounding  s of a Vertex_Retrieve the outbounding  s of a Vertex`Retrieve the incident 5s of a Vertex | Both inbounding and outbounding arcsa*Retrieve the adjacent vertices of a vertexb Tell if a I is symmetric | All of its s are bidirectedc Tell if a I* is oriented | There are none bidirected s | Note: This is not the opposite of bd Tell if a I is isolated | A graph is isolatedR if it has no edges, that is, it has a degree of 0 | TODO: What if it has a loop?eEDegree of a vertex | The total number of inbounding and outbounding  s of a vertexf1Indegree of a vertex | The number of inbounding  s to a vertexg3Outdegree of a vertex | The number of outbounding s from a vertexh#Indegrees of all the vertices in a Ii#Outdegree of all the vertices in a Ij Tell if a I$ is balanced | A Directed Graph is balanced when its indegree = outdegreek Tell if a I# is regular | A Directed Graph is regularT 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 toher.l.Tell if a vertex is a source | A vertex is a source when its  indegree = 0m,Tell if a vertex is a sink | A vertex is a sink when its  outdegree = 0n.Tell if a vertex is internal | A vertex is a internal when its neither a source nor a sinko Tell if a H is a Directed Graphic | A Directed Graphic! is a Degree Sequence for wich a IG exists TODO: Kleitman Wang | Fulkerson Chen Anstee theorem algorithms)HIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop(HIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno)IJKpHLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno'HIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopSafes Tell if a #( is connected | An Undirected Graph is  connected7 when there is a path between every pair | of verticest Tell if a #+ is disconnected | An Undirected Graph is  disconnected when its not  connected . See | sB TODO: An edgeles graph with two or more vertices is disconnecteduTell if two vertices of a ## are connected | Two vertices are  connected! if it exists a path between themvTell if two vertices of a #& are disconnected | Two vertices are  disconnected( if it doesn't exist a path between themw+Retrieve all the unreachable vertices of a # | The unreachable vertices are those with no adjacent Edgesx Tell if a I, is weakly connected | A Directed Graph is weakly connected* if the equivalent undirected graph | is  connectedstuvwxstuvwxstuvwxstuvwx|        !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLLM*+,-NOPQRS456TU9VWXYZ[\]^=_`abcCdefghijklmnopqrst'graphite-0.0.1.0-JAF9R4u2AXeJBBkt8lfM50Data.Graph.TypesData.Graph.GraphData.Graph.VisualizeData.Graph.DGraphData.Graph.ConnectivityLabeledlabelWeightedweightLinksArcEdge arbitraryEdge<->--> toOrderedPairtoUnorderedPair insertLinkgetLinks linksToArcs linksToEdges hashMapInsert$fArbitraryArc$fArbitraryEdge $fLabeled(,) $fWeighted(,) $fLabeled[]$fWeightedDouble$fWeightedFloat $fWeightedInt$fEqArc$fEqEdge $fShowEdge $fReadEdge $fOrdEdge $fShowArc $fReadArc$fOrdArcGraphunGraph randomGraphIOempty insertVertex removeVertexinsertVertices insertEdge insertEdges removeEdge removeEdge'removeEdgeAndVerticesremoveEdgeAndVertices'verticesordersizeedgesedges'containsVertex containsEdge containsEdge' incidentEdges vertexDegreedegrees maxDegree minDegreeisLoopisSimple isRegularfromAdjacencyMatrixtoAdjacencyMatrix$fArbitraryGraph $fEqGraph $fShowGraphplotIO plotXdgIODegreeSequenceDGraphunDGraph insertArc insertArcs removeArc removeArc'removeArcAndVerticesremoveArcAndVertices'arcsarcs' containsArc containsArc'inboundingArcsoutboundingArcs incidentArcsadjacentVertices isSymmetric isOriented isIsolatedvertexIndegreevertexOutdegree indegrees outdegrees isBalancedisSourceisSink isInternalisDirectedGraphic$fArbitraryDGraph $fEqDGraph $fShowDGraph isConnectedisDisconnected areConnectedareDisconnectedunreachableVerticesisWeaklyConnected labeledNodes labeledEdgestoDot'