5      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Safe9;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 linksO(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'# The Degree Sequence of a simple ( is a list of degrees&!Probability value between 0 and 1( Undirected Graph of Vertices in v and Edges with attributes in e+ Construct a & value,Generate a random (! of the ErdQs Rnyi G(n, p) model.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 untouched0O(n) Remove a vertex from a ( if present | Every ( incident to this vertex is also removed1 O(m*log n) Insert a many vertices into a (O | New vertices are inserted and already contained vertices are left untouched2O(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 updated3 O(m*log n) Insert many directed  s into a ( | Same rules as 2 are applied4O(log n) Remove the undirected  from a (7 if present | The involved vertices are left untouched5Same as 4" but the edge is an unordered pair6O(log n) Remove the undirected  from a (5 if present | The involved vertices are also removed7Same as 6" but the edge is an unordered pair8O(n) Retrieve the vertices of a (9O(n) Retrieve the order of a ( | The order% of a graph is its number of vertices:O(n*m) Retrieve the size of a ( | The size) of an undirected graph is its number of s;O(n*m) Retrieve the s of a (<Same as ;I but the edges are unordered pairs, and their attributes | are discarded=O(log n)% Tell if a vertex exists in the graph>O(log n) Tell if an undirected  exists in the graph?Same as >" but the edge is an unordered pair@*Retrieve the adjacent vertices of a vertexARetrieve the incident  s of a VertexB0Degree of a vertex | The total number incident  s of a vertexC#Degrees of a all the vertices in a (DMaximum degree of a (EMinimum degree of a (F Tell if an  forms a loop | An < forms a loop with both of its ends point to the same vertexG Tell if a ( is simple | A ( is simple& if it has no multiple edges nor loopsH Tell if a (& is regular | An Undirected Graph is regularF when all of its vertices have the same | number of adjacent verticesI Tell if two (s are isomorphicKGenerate a directed (3 of Int vertices from an adjacency | square matrixL6Get the adjacency matrix representation of a directed (M Construct a #? from a list of degrees | Negative degree values are discardedNGet the # of a simple ( | If the graph is not simple (see G) the result is NothingO Tell if a #3 is a Graphical Sequence | A Degree Sequence is a Graphical Sequence if a corresponding ( for | it existsPGet the corresponding ( of a # | If the # is not graphical (see O) the | result is Nothing/#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP/()*Q&'+,-./0123456789:;<=>?@ABCDEFGHIJKL#$%MNOP*#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQNoneZPlot an undirected Graph to a PNG image file[Same as Z# but open the resulting image with xdg-openZ[Z[Z[Z[SafeT&\The Degree Sequence of a ]) is a list of pairs (Indegree, Outdegree)]Directed Graph of Vertices in v and Arcs with attributes in e`The Empty (order-zero) ] with no vertices and no arcsaO(log n) Insert a vertex into a ]F | If the graph already contains the vertex leave the graph untouchedbO(n) Remove a vertex from a ] if present | Every ( incident to this vertex is also removedc O(m*log n) Insert a many vertices into a ]O | New vertices are inserted and already contained vertices are left untoucheddO(log n) Insert a directed  into a ]y | The involved vertices are inserted if don't exist. If the graph already | contains the Arc, its attribute is updatede O(m*log n) Insert many directed  s into a ] | Same rules as d are appliedfO(log n) Remove the directed  from a ]7 if present | The involved vertices are left untouchedgSame as f but the arc is an ordered pairhO(log n) Remove the directed  from a ]5 if present | The involved vertices are also removediSame as h but the arc is an ordered pairjO(n) Retrieve the vertices of a ]kO(n) Retrieve the order of a ] | The order% of a graph is its number of verticeslO(n*m) Retrieve the size of a ] | The size& of a directed graph is its number of smO(n*m) Retrieve the s of a ]nSame as mF but the arcs are ordered pairs, and their attributes are | discardedoO(log n)% Tell if a vertex exists in the graphpO(log n) Tell if a directed  exists in the graphqSame as p but the arc is an ordered pairrRetrieve the inbounding  s of a VertexsRetrieve the outbounding  s of a VertextRetrieve the incident 5s of a Vertex | Both inbounding and outbounding arcsu*Retrieve the adjacent vertices of a vertexv Tell if a ] is symmetric | All of its s are bidirectedw Tell if a ]* is oriented | There are none bidirected s | Note: This is not the opposite of vx Tell if a ] 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?yEDegree of a vertex | The total number of inbounding and outbounding  s of a vertexz1Indegree of a vertex | The number of inbounding  s to a vertex{3Outdegree of a vertex | 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 balanced | A Directed Graph is balanced when its indegree = outdegree Tell if a ]# 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..Tell if a vertex is a source | A vertex is a source when its  indegree = 0,Tell if a vertex is a sink | A vertex is a sink when its  outdegree = 0.Tell if a vertex is internal | A vertex is a internal when its neither a source nor a sink Tell if a \ is a Directed Graphic | A Directed Graphic! is a Degree Sequence for wich a ]G exists TODO: Kleitman Wang | Fulkerson Chen Anstee theorem algorithms)\]^_`abcdefghijklmnopqrstuvwxyz{|}~(\]^_`abcdefghijklmnopqrstuvwxyz{|}~)]^_\`abcdefghijklmnopqrstuvwxyz{|}~'\]^_`abcdefghijklmnopqrstuvwxyz{|}~Safe Tell if a (( is connected | An Undirected Graph is  connected7 when there is a path between every pair | of vertices Tell if a (+ is disconnected | An Undirected Graph is  disconnected when its not  connected . See | B TODO: An edgeles graph with two or more vertices is disconnectedTell if two vertices of a (# are connected | Two vertices are  connected! if it exists a path between themTell if two vertices of a (& are disconnected | Two vertices are  disconnected( if it doesn't exist a path between them+Retrieve all the unreachable vertices of a ( | The unreachable vertices are those with no adjacent Edges Tell if a ], is weakly connected | A Directed Graph is weakly connected* if the equivalent undirected graph | is  connected        !"#$%&''()*++,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]'^^_0123`abcde:;<fg?hijklBmnoDpqrstJuvwxyz{|}~'graphite-0.0.2.0-8cgT9zTSIksA7LRCfqs2EtData.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$fOrdArcDegreeSequenceunDegreeSequence ProbabilityPGraphunGraph probability erdosRenyiIO randomMatIOempty insertVertex removeVertexinsertVertices insertEdge insertEdges removeEdge removeEdge'removeEdgeAndVerticesremoveEdgeAndVertices'verticesordersizeedgesedges'containsVertex containsEdge containsEdge'adjacentVertices incidentEdges vertexDegreedegrees maxDegree minDegreeisLoopisSimple isRegular areIsomorphic isomorphismfromAdjacencyMatrixtoAdjacencyMatrixdegreeSequencegetDegreeSequenceisGraphicalSequencefromGraphicalSequence$fArbitraryGraph $fEqGraph $fShowGraph$fEqProbability$fOrdProbability$fShowProbability$fEqDegreeSequence$fOrdDegreeSequence$fShowDegreeSequenceplotIO plotXdgIODGraphunDGraph insertArc insertArcs removeArc removeArc'removeArcAndVerticesremoveArcAndVertices'arcsarcs' containsArc containsArc'inboundingArcsoutboundingArcs incidentArcs isSymmetric isOriented isIsolatedvertexIndegreevertexOutdegree indegrees outdegrees isBalancedisSourceisSink isInternalisDirectedGraphic$fArbitraryDGraph $fEqDGraph $fShowDGraph isConnectedisDisconnected areConnectedareDisconnectedunreachableVerticesisWeaklyConnected labeledNodes labeledEdgestoDot'