[{"name":"Graph","comment":"\n\n\n# Graph\n\nThe Graph type helps define relational data.\n\n@docs Graph\n\nA Graph consists of data points (called vertices) that can be connected to each\nother.\n\n@docs Vertex, vLabel\n\nVertices can connect to each other using edges. A connection has a one-way\ndirection and a label. There can not be more than two edges between two vertices\n(one for each direction).\n\n@docs Edge, eLabel, origin, destination\n\n\n## Build\n\n@docs empty, singleton, insertV, insertE, updateE, removeE, removeV\n\n\n## Query\n\n@docs isEmpty, getE, sizeE, sizeV\n\n\n## Lists\n\n@docs v, e\n\n\n## Transform\n\n@docs mapV, mapE, foldl, foldr\n\n\n## Traverse\n\n@docs degree, pointsTo\n\n","unions":[{"name":"Edge","comment":" An edge is a relation between two vertices. For example, one person can have\na relationship with another person - and you can use a custom `edge` type to\nreveal more about the _type_ of relationship.\n","args":["vertex","edge"],"cases":[]},{"name":"Graph","comment":" A graph is a large data type containing various data points that are linked\nto each other.\n","args":["vertex","edge"],"cases":[]},{"name":"Vertex","comment":" A Vertex is a data point within the graph. You can store various bits of\ncontent in it.\n","args":["vertex"],"cases":[]}],"aliases":[],"values":[{"name":"degree","comment":" Get the number of outgoing edges for a given vertex.\n","type":"Graph.Vertex vertex -> Graph.Graph vertex edge -> Basics.Int"},{"name":"destination","comment":" Get the destination that an edge points to.\n","type":"Graph.Edge vertex edge -> Graph.Vertex vertex"},{"name":"e","comment":" Get a list of all edges\n","type":"Graph.Graph vertex edge -> List.List (Graph.Edge vertex edge)"},{"name":"eLabel","comment":" Finds the label of an edge.\n","type":"Graph.Edge vertex edge -> edge"},{"name":"empty","comment":" A new and empty graph containing no vertices.\n","type":"Graph.Graph vertex edge"},{"name":"foldl","comment":" Fold over the vertices in the graph from oldest to newest added vertex.\n","type":"(Graph.Vertex vertex -> a -> a) -> a -> Graph.Graph vertex edge -> a"},{"name":"foldr","comment":" Fold over the vertices in the graph from newest to oldest added vertex.\n","type":"(Graph.Vertex vertex -> a -> a) -> a -> Graph.Graph vertex edge -> a"},{"name":"getE","comment":" Get an edge between two vertices, if it exists.\n","type":"{ from : Graph.Vertex vertex, to : Graph.Vertex vertex } -> Graph.Graph vertex edge -> Maybe.Maybe (Graph.Edge vertex edge)"},{"name":"insertE","comment":" Insert a new edge into the graph. If the edge already exists, it is\noverwritten.\n","type":"{ content : edge, from : Graph.Vertex vertex, to : Graph.Vertex vertex } -> Graph.Graph vertex edge -> Graph.Graph vertex edge"},{"name":"insertV","comment":" Insert a new vertex into the graph.\n","type":"vertex -> Graph.Graph vertex edge -> ( Graph.Vertex vertex, Graph.Graph vertex edge )"},{"name":"isEmpty","comment":" Checks whether a graph is empty.\n","type":"Graph.Graph vertex edge -> Basics.Bool"},{"name":"mapE","comment":" Map all edge labels to a new value. Note that this function is completely\nblind to the location of each edge.\n","type":"(edge1 -> edge2) -> Graph.Graph vertex edge1 -> Graph.Graph vertex edge2"},{"name":"mapV","comment":" Map all vertex labels to a new value. This function cannot change the\nstructure of the graph, but it can use the structure of the graph to remap the\nlabels.\n","type":"(Graph.Vertex vertex1 -> vertex2) -> Graph.Graph vertex1 edge -> Graph.Graph vertex2 edge"},{"name":"origin","comment":" Get the vertex that an edge starts from.\n","type":"Graph.Edge vertex edge -> Graph.Vertex vertex"},{"name":"pointsTo","comment":" Get all the edges that start from a given vertex.\n","type":"Graph.Vertex vertex -> Graph.Graph vertex edge -> List.List ( edge, Graph.Vertex vertex )"},{"name":"removeE","comment":" Remove an edge from the graph.\n","type":"{ from : Graph.Vertex vertex, to : Graph.Vertex vertex } -> Graph.Graph vertex edge -> Graph.Graph vertex edge"},{"name":"removeV","comment":" Remove a vertex from the graph.\n","type":"Graph.Vertex vertex -> Graph.Graph vertex edge -> Graph.Graph vertex edge"},{"name":"singleton","comment":" Create a graph with a single vertex in it.\n","type":"vertex -> ( Graph.Vertex vertex, Graph.Graph vertex edge )"},{"name":"sizeE","comment":" Determines the number of edges in a graph.\n","type":"Graph.Graph vertex edge -> Basics.Int"},{"name":"sizeV","comment":" Determines the number of vertices in a graph.\n","type":"Graph.Graph vertex edge -> Basics.Int"},{"name":"updateE","comment":" Check whether an edge already exists, and update it according to your needs.\n","type":"{ from : Graph.Vertex vertex, to : Graph.Vertex vertex } -> (Maybe.Maybe edge -> Maybe.Maybe edge) -> Graph.Graph vertex edge -> Graph.Graph vertex edge"},{"name":"v","comment":" Get a list of all vertices.\n","type":"Graph.Graph vertex edge -> List.List (Graph.Vertex vertex)"},{"name":"vLabel","comment":" Finds the label of a vertex.\n","type":"Graph.Vertex vertex -> vertex"}],"binops":[]}]