var searchIndex = {}; searchIndex["petgraph"] = {"doc":"**petgraph** is a graph data structure library.","items":[[3,"MinScored","petgraph","`MinScored<K, T>` holds a score `K` and a scored object `T` in\na pair for use with a `BinaryHeap`.",null,null],[12,"0","","",0,null],[12,"1","","",0,null],[3,"Directed","","Marker type for a directed graph.",null,null],[3,"Undirected","","Marker type for an undirected graph.",null,null],[3,"Ptr","","A reference that is hashed and compared by its pointer value.",null,null],[12,"0","","",1,null],[4,"EdgeDirection","","Edge direction",null,null],[13,"Outgoing","","An `Outgoing` edge is an outward edge *from* the current node.",2,null],[13,"Incoming","","An `Incoming` edge is an inbound edge *to* the current node.",2,null],[11,"fmt","","",0,null],[11,"clone","","",0,null],[11,"eq","","",0,null],[11,"partial_cmp","","",0,null],[11,"cmp","","",0,null],[0,"algo","","Graph algorithms.",null,null],[5,"is_isomorphic","petgraph::algo","Return **true** if the graphs **g0** and **g1** are isomorphic.",null,{"inputs":[{"name":"graph"},{"name":"graph"}],"output":{"name":"bool"}}],[5,"dijkstra","","Dijkstra's shortest path algorithm.",null,{"inputs":[{"name":"g"},{"name":"nodeid"},{"name":"option"},{"name":"f"}],"output":{"name":"hashmap"}}],[5,"is_cyclic_undirected","","Return **true** if the input graph contains a cycle.",null,{"inputs":[{"name":"graph"}],"output":{"name":"bool"}}],[5,"is_cyclic","","**Deprecated: Renamed to *is_cyclic_undirected*.**",null,{"inputs":[{"name":"graph"}],"output":{"name":"bool"}}],[5,"is_cyclic_directed","","Check if a directed graph contains cycles.",null,{"inputs":[{"name":"graph"}],"output":{"name":"bool"}}],[5,"toposort","","Perform a topological sort of a directed graph.",null,{"inputs":[{"name":"graph"}],"output":{"name":"vec"}}],[5,"scc","","Compute *Strongly connected components* using Kosaraju's algorithm.",null,{"inputs":[{"name":"graph"}],"output":{"name":"vec"}}],[5,"connected_components","","Return the number of connected components of the graph.",null,{"inputs":[{"name":"graph"}],"output":{"name":"usize"}}],[5,"min_spanning_tree","","Return a *Minimum Spanning Tree* of a graph.",null,{"inputs":[{"name":"graph"}],"output":{"name":"graph"}}],[0,"graphmap","petgraph","`GraphMap<N, E>` is an undirected graph where node values are mapping keys.",null,null],[3,"GraphMap","petgraph::graphmap","`GraphMap<N, E>` is an undirected graph, with generic node values `N` and edge weights `E`.",null,null],[3,"Nodes","","",null,null],[3,"Neighbors","","",null,null],[3,"Edges","","",null,null],[12,"from","","",3,null],[12,"edges","","",3,null],[12,"iter","","",3,null],[8,"NodeTrait","","A trait group for `GraphMap`'s node identifier.",null,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"new","","Create a new `GraphMap`.",4,{"inputs":[],"output":{"name":"self"}}],[11,"with_capacity","","Create a new `GraphMap` with estimated capacity.",4,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"self"}}],[11,"node_count","","Return the number of nodes in the graph.",4,null],[11,"edge_count","","Return the number of edges in the graph.",4,null],[11,"clear","","Remove all nodes and edges",4,null],[11,"add_node","","Add node `n` to the graph.",4,null],[11,"remove_node","","Return `true` if node `n` was removed.",4,null],[11,"contains_node","","Return `true` if the node is contained in the graph.",4,null],[11,"add_edge","","Add an edge connecting `a` and `b` to the graph.",4,null],[11,"remove_edge","","Remove edge from `a` to `b` from the graph and return the edge weight.",4,null],[11,"contains_edge","","Return `true` if the edge connecting `a` with `b` is contained in the graph.",4,null],[11,"nodes","","Return an iterator over the nodes of the graph.",4,null],[11,"neighbors","","Return an iterator over the nodes that are connected with `from` by edges.",4,null],[11,"edges","","Return an iterator over the nodes that are connected with `from` by edges,\npaired with the edge weight.",4,null],[11,"edge_weight","","Return a reference to the edge weight connecting `a` with `b`, or\n`None` if the edge does not exist in the graph.",4,null],[11,"edge_weight_mut","","Return a mutable reference to the edge weight connecting `a` with `b`, or\n`None` if the edge does not exist in the graph.",4,null],[11,"next","","",5,null],[11,"size_hint","","",5,null],[11,"next_back","","",5,null],[11,"next","","",6,null],[11,"size_hint","","",6,null],[11,"next_back","","",6,null],[11,"next","","",3,null],[11,"index","","",4,null],[11,"index_mut","","",4,null],[0,"graph","petgraph","`Graph<N, E, Ty, Ix>` is a graph datastructure using an adjacency list representation.",null,null],[3,"NodeIndex","petgraph::graph","Node identifier.",null,null],[3,"EdgeIndex","","Edge identifier.",null,null],[3,"Node","","The graph's node type.",null,null],[12,"weight","","Associated node data.",7,null],[3,"Edge","","The graph's edge type.",null,null],[12,"weight","","Associated edge data.",8,null],[3,"Graph","","`Graph<N, E, Ty, Ix>` is a graph datastructure using an adjacency list representation.",null,null],[3,"WithoutEdges","","An iterator over either the nodes without edges to them or from them.",null,null],[3,"Neighbors","","Iterator over the neighbors of a node.",null,null],[3,"Edges","","Iterator over the edges of a node.",null,null],[3,"NodeWeightsMut","","Iterator yielding mutable access to all node weights.",null,null],[3,"EdgeWeightsMut","","Iterator yielding mutable access to all edge weights.",null,null],[3,"WalkEdges","","A “walker” object that can be used to step through the edge list of a node.",null,null],[6,"DefIndex","","The default integer type for node and edge indices in `Graph`.\n`u32` is the default to reduce the size of the graph's data and improve\nperformance in the common case.",null,null],[8,"IndexType","","Trait for the unsigned integer type used for node and edge indices.",null,null],[10,"new","","",9,{"inputs":[{"name":"usize"}],"output":{"name":"self"}}],[10,"index","","",9,null],[10,"max","","",9,{"inputs":[],"output":{"name":"self"}}],[10,"zero","","",9,{"inputs":[],"output":{"name":"self"}}],[10,"one","","",9,{"inputs":[],"output":{"name":"self"}}],[8,"GraphIndex","","A `GraphIndex` is a node or edge index.",null,null],[11,"hash","","",10,null],[11,"cmp","","",10,null],[11,"partial_cmp","","",10,null],[11,"lt","","",10,null],[11,"le","","",10,null],[11,"gt","","",10,null],[11,"ge","","",10,null],[11,"eq","","",10,null],[11,"ne","","",10,null],[11,"fmt","","",10,null],[11,"clone","","",10,null],[11,"new","","",10,{"inputs":[{"name":"usize"}],"output":{"name":"self"}}],[11,"index","","",10,null],[11,"end","","",10,{"inputs":[],"output":{"name":"self"}}],[11,"hash","","",11,null],[11,"cmp","","",11,null],[11,"partial_cmp","","",11,null],[11,"lt","","",11,null],[11,"le","","",11,null],[11,"gt","","",11,null],[11,"ge","","",11,null],[11,"eq","","",11,null],[11,"ne","","",11,null],[11,"clone","","",11,null],[11,"new","","",11,{"inputs":[{"name":"usize"}],"output":{"name":"self"}}],[11,"index","","",11,null],[11,"end","","An invalid `EdgeIndex` used to denote absence of an edge, for example\nto end an adjacency list.",11,{"inputs":[],"output":{"name":"self"}}],[11,"fmt","","",11,null],[11,"clone","","",7,null],[11,"fmt","","",7,null],[11,"next_edge","","Accessor for data structure internals: the first edge in the given direction.",7,null],[11,"clone","","",8,null],[11,"fmt","","",8,null],[11,"next_edge","","Accessor for data structure internals: the next edge for the given direction.",8,null],[11,"source","","Return the source node index.",8,null],[11,"target","","Return the target node index.",8,null],[11,"clone","","",12,null],[11,"fmt","","",12,null],[11,"new","","Create a new `Graph` with directed edges.",12,{"inputs":[],"output":{"name":"self"}}],[11,"new_undirected","","Create a new `Graph` with undirected edges.",12,{"inputs":[],"output":{"name":"self"}}],[11,"with_capacity","","Create a new `Graph` with estimated capacity.",12,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"self"}}],[11,"node_count","","Return the number of nodes (vertices) in the graph.",12,null],[11,"edge_count","","Return the number of edges in the graph.",12,null],[11,"clear","","Remove all nodes and edges",12,null],[11,"is_directed","","Return whether the graph has directed edges or not.",12,null],[11,"into_edge_type","","Cast the graph as either undirected or directed. No edge adjustments\nare done.",12,null],[11,"add_node","","Add a node (also called vertex) with weight `w` to the graph.",12,null],[11,"node_weight","","Access node weight for node `a`.",12,null],[11,"node_weight_mut","","Access node weight for node `a`.",12,null],[11,"neighbors","","Return an iterator of all nodes with an edge starting from `a`.",12,null],[11,"neighbors_directed","","Return an iterator of all neighbors that have an edge between them and `a`,\nin the specified direction.\nIf the graph is undirected, this is equivalent to *.neighbors(a)*.",12,null],[11,"neighbors_undirected","","Return an iterator of all neighbors that have an edge between them and `a`,\nin either direction.\nIf the graph is undirected, this is equivalent to *.neighbors(a)*.",12,null],[11,"edges","","Return an iterator over the neighbors of node `a`, paired with their respective edge\nweights.",12,null],[11,"edges_directed","","Return an iterator of all neighbors that have an edge between them and `a`,\nin the specified direction, paired with the respective edge weights.",12,null],[11,"edges_both","","Return an iterator over the edgs from `a` to its neighbors, then *to* `a` from its\nneighbors.",12,null],[11,"add_edge","","Add an edge from `a` to `b` to the graph, with its edge weight.",12,null],[11,"update_edge","","Add or update an edge from `a` to `b`.",12,null],[11,"edge_weight","","Access the edge weight for `e`.",12,null],[11,"edge_weight_mut","","Access the edge weight for `e` mutably.",12,null],[11,"remove_node","","Remove `a` from the graph if it exists, and return its weight.\nIf it doesn't exist in the graph, return `None`.",12,null],[11,"remove_edge","","Remove an edge and return its edge weight, or `None` if it didn't exist.",12,null],[11,"find_edge","","Lookup an edge from `a` to `b`.",12,null],[11,"find_edge_undirected","","Lookup an edge between `a` and `b`, in either direction.",12,null],[11,"reverse","","Reverse the direction of all edges",12,null],[11,"without_edges","","Return an iterator over either the nodes without edges to them or from them.",12,null],[11,"node_weights_mut","","Return an iterator yielding mutable access to all node weights.",12,null],[11,"edge_weights_mut","","Return an iterator yielding mutable access to all edge weights.",12,null],[11,"raw_nodes","","Access the internal node array.",12,null],[11,"raw_edges","","Access the internal edge array.",12,null],[11,"first_edge","","Accessor for data structure internals: the first edge in the given direction.",12,null],[11,"next_edge","","Accessor for data structure internals: the next edge for the given direction.",12,null],[11,"walk_edges_directed","","Return a “walker” object that can be used to step through the edges\nof the node `a` in direction `dir`.",12,null],[11,"index_twice_mut","","Index the `Graph` by two indices, any combination of\nnode or edge indices is fine.",12,null],[11,"next","","",13,null],[11,"next","","",14,null],[11,"next","","",15,null],[11,"next","","",16,null],[11,"size_hint","","",16,null],[11,"next","","",17,null],[11,"size_hint","","",17,null],[11,"index","","",12,null],[11,"index_mut","","",12,null],[11,"index","","",12,null],[11,"index_mut","","",12,null],[11,"index","","",10,null],[11,"is_node_index","","",10,{"inputs":[],"output":{"name":"bool"}}],[11,"index","","",11,null],[11,"is_node_index","","",11,{"inputs":[],"output":{"name":"bool"}}],[11,"fmt","","",18,null],[11,"clone","","",18,null],[11,"next","","Fetch the next edge index in the walk for graph `g`.",18,null],[11,"next_neighbor","","Fetch the next edge index and the next node index in the walk for graph `g`.",18,null],[0,"visit","petgraph","Graph visitor algorithms.",null,null],[3,"AsUndirected","petgraph::visit","Wrapper type for walking the graph as if it is undirected",null,null],[12,"0","","",19,null],[3,"Reversed","","Wrapper type for walking edges the other way",null,null],[12,"0","","",20,null],[3,"Dfs","","A depth first search (DFS) of a graph.",null,null],[12,"stack","","The stack of nodes to visit",21,null],[12,"discovered","","The map of discovered nodes",21,null],[3,"DfsIter","","An iterator for a depth first traversal of a graph.",null,null],[3,"Bfs","","A breadth first search (BFS) of a graph.",null,null],[12,"stack","","The queue of nodes to visit",22,null],[12,"discovered","","The map of discovered nodes",22,null],[3,"BfsIter","","An iterator for a breadth first traversal of a graph.",null,null],[8,"Graphlike","","Base trait for graphs that defines the node identifier.",null,null],[16,"NodeId","","",23,null],[8,"NeighborIter","","A graph trait for accessing the neighbors iterator",null,null],[16,"Iter","","",24,null],[10,"neighbors","","Return an iterator that visits all neighbors of the node **n**.",24,null],[8,"VisitMap","","A mapping from node → is_visited.",null,null],[10,"visit","","Return **true** if the value is not already present.",25,null],[10,"is_visited","","",25,null],[8,"Visitable","","Trait for which datastructure to use for a graph’s visitor map",null,null],[16,"Map","","",26,null],[10,"visit_map","","",26,null],[8,"GetAdjacencyMatrix","","Create or access the adjacency matrix of a graph",null,null],[16,"AdjMatrix","","",27,null],[10,"adjacency_matrix","","",27,null],[10,"is_adjacent","","",27,null],[11,"neighbors","petgraph::graph","",12,null],[11,"neighbors","petgraph::graphmap","",4,null],[11,"neighbors","petgraph::visit","",19,null],[11,"neighbors","","",20,null],[11,"visit_map","petgraph::graph","",12,null],[11,"visit_map","petgraph::graphmap","",4,null],[11,"visit_map","petgraph::visit","",19,null],[11,"visit_map","","",20,null],[11,"adjacency_matrix","petgraph::graphmap","",4,null],[11,"is_adjacent","","",4,null],[11,"fmt","petgraph::visit","",21,null],[11,"clone","","",21,null],[11,"new","","Create a new **Dfs**, using the graph's visitor map, and put **start**\nin the stack of nodes to visit.",21,{"inputs":[{"name":"g"},{"name":"n"}],"output":{"name":"self"}}],[11,"empty","","Create a new **Dfs** using the graph's visitor map, and no stack.",21,{"inputs":[{"name":"g"}],"output":{"name":"self"}}],[11,"move_to","","Keep the discovered map, but clear the visit stack and restart\nthe dfs from a particular node.",21,null],[11,"next","","Return the next node in the dfs, or **None** if the traversal is done.",21,null],[11,"new","","",28,{"inputs":[{"name":"g"},{"name":"nodeid"}],"output":{"name":"self"}}],[11,"move_to","","Keep the discovered map, but clear the visit stack and restart\nthe DFS traversal from a particular node.",28,null],[11,"next","","",28,null],[11,"size_hint","","",28,null],[11,"clone","","",28,null],[11,"clone","","",22,null],[11,"new","","Create a new **Bfs**, using the graph's visitor map, and put **start**\nin the stack of nodes to visit.",22,{"inputs":[{"name":"g"},{"name":"n"}],"output":{"name":"self"}}],[11,"next","","Return the next node in the dfs, or **None** if the traversal is done.",22,null],[11,"new","","",29,{"inputs":[{"name":"g"},{"name":"nodeid"}],"output":{"name":"self"}}],[11,"next","","",29,null],[11,"size_hint","","",29,null],[11,"clone","","",29,null],[0,"unionfind","petgraph","`UnionFind<K>` is a disjoint-set data structure.",null,null],[3,"UnionFind","petgraph::unionfind","`UnionFind<K>` is a disjoint-set data structure. It tracks set membership of *n* elements\nindexed from *0* to *n - 1*. The scalar type is `K` which must be an unsigned integer type.",null,null],[11,"clone","","",30,null],[11,"fmt","","",30,null],[11,"new","","Create a new `UnionFind` of `n` disjoint sets.",30,{"inputs":[{"name":"usize"}],"output":{"name":"self"}}],[11,"find","","Return the representative for `x`.",30,null],[11,"find_mut","","Return the representative for `x`.",30,null],[11,"union","","Unify the two sets containing `x` and `y`.",30,null],[11,"into_labeling","","Return a vector mapping each element to its representative.",30,null],[11,"adjacency_matrix","petgraph::graph","",12,null],[11,"is_adjacent","","",12,null],[8,"EdgeType","petgraph","A graph's edge type determines whether is has directed edges or not.",null,null],[10,"is_directed","","",31,{"inputs":[],"output":{"name":"bool"}}],[11,"eq","","",2,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"fmt","","",32,null],[11,"clone","","",32,null],[11,"fmt","","",33,null],[11,"clone","","",33,null],[11,"is_directed","","",32,{"inputs":[],"output":{"name":"bool"}}],[11,"is_directed","","",33,{"inputs":[],"output":{"name":"bool"}}],[11,"clone","","",1,null],[11,"eq","","Ptr compares by pointer equality, i.e if they point to the same value",1,null],[11,"partial_cmp","","",1,null],[11,"cmp","","Ptr is ordered by pointer value, i.e. an arbitrary but stable and total order.",1,null],[11,"deref","","",1,null],[11,"hash","","",1,null],[11,"fmt","","",1,null]],"paths":[[3,"MinScored"],[3,"Ptr"],[4,"EdgeDirection"],[3,"Edges"],[3,"GraphMap"],[3,"Nodes"],[3,"Neighbors"],[3,"Node"],[3,"Edge"],[8,"IndexType"],[3,"NodeIndex"],[3,"EdgeIndex"],[3,"Graph"],[3,"WithoutEdges"],[3,"Neighbors"],[3,"Edges"],[3,"NodeWeightsMut"],[3,"EdgeWeightsMut"],[3,"WalkEdges"],[3,"AsUndirected"],[3,"Reversed"],[3,"Dfs"],[3,"Bfs"],[8,"Graphlike"],[8,"NeighborIter"],[8,"VisitMap"],[8,"Visitable"],[8,"GetAdjacencyMatrix"],[3,"DfsIter"],[3,"BfsIter"],[3,"UnionFind"],[8,"EdgeType"],[3,"Directed"],[3,"Undirected"]]}; initSearch(searchIndex);