412 lines
No EOL
138 KiB
HTML
412 lines
No EOL
138 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="generator" content="rustdoc">
|
||
<meta name="description" content="API documentation for the Rust `StableGraph` struct in crate `petgraph`.">
|
||
<meta name="keywords" content="rust, rustlang, rust-lang, StableGraph">
|
||
|
||
<title>petgraph::stable_graph::StableGraph - Rust</title>
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../normalize.css">
|
||
<link rel="stylesheet" type="text/css" href="../../rustdoc.css"
|
||
id="mainThemeStyle">
|
||
|
||
<link rel="stylesheet" type="text/css" href="../../dark.css">
|
||
<link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle">
|
||
<script src="../../storage.js"></script>
|
||
|
||
|
||
|
||
|
||
</head>
|
||
<body class="rustdoc struct">
|
||
<!--[if lte IE 8]>
|
||
<div class="warning">
|
||
This old browser is unsupported and will most likely display funky
|
||
things.
|
||
</div>
|
||
<![endif]-->
|
||
|
||
|
||
|
||
<nav class="sidebar">
|
||
<div class="sidebar-menu">☰</div>
|
||
|
||
<p class='location'>Struct StableGraph</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.with_capacity">with_capacity</a><a href="#method.capacity">capacity</a><a href="#method.clear">clear</a><a href="#method.clear_edges">clear_edges</a><a href="#method.node_count">node_count</a><a href="#method.edge_count">edge_count</a><a href="#method.is_directed">is_directed</a><a href="#method.add_node">add_node</a><a href="#method.remove_node">remove_node</a><a href="#method.contains_node">contains_node</a><a href="#method.add_edge">add_edge</a><a href="#method.update_edge">update_edge</a><a href="#method.remove_edge">remove_edge</a><a href="#method.node_weight">node_weight</a><a href="#method.node_weight_mut">node_weight_mut</a><a href="#method.node_indices">node_indices</a><a href="#method.edge_weight">edge_weight</a><a href="#method.edge_weight_mut">edge_weight_mut</a><a href="#method.edge_endpoints">edge_endpoints</a><a href="#method.edge_indices">edge_indices</a><a href="#method.find_edge">find_edge</a><a href="#method.find_edge_undirected">find_edge_undirected</a><a href="#method.neighbors">neighbors</a><a href="#method.neighbors_directed">neighbors_directed</a><a href="#method.neighbors_undirected">neighbors_undirected</a><a href="#method.edges">edges</a><a href="#method.edges_directed">edges_directed</a><a href="#method.index_twice_mut">index_twice_mut</a><a href="#method.retain_nodes">retain_nodes</a><a href="#method.retain_edges">retain_edges</a><a href="#method.from_edges">from_edges</a><a href="#method.map">map</a><a href="#method.filter_map">filter_map</a><a href="#method.extend_with_edges">extend_with_edges</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-IntoNeighbors">IntoNeighbors</a><a href="#impl-IntoNeighborsDirected">IntoNeighborsDirected</a><a href="#impl-IntoNodeIdentifiers">IntoNodeIdentifiers</a><a href="#impl-NodeCount">NodeCount</a><a href="#impl-GraphProp">GraphProp</a><a href="#impl-GraphBase">GraphBase</a><a href="#impl-Visitable">Visitable</a><a href="#impl-Data">Data</a><a href="#impl-DataMap">DataMap</a><a href="#impl-DataMapMut">DataMapMut</a><a href="#impl-Build">Build</a><a href="#impl-Create">Create</a><a href="#impl-FromElements">FromElements</a><a href="#impl-Debug">Debug</a><a href="#impl-Clone">Clone</a><a href="#impl-Index%3CNodeIndex%3CIx%3E%3E">Index<NodeIndex<Ix>></a><a href="#impl-IndexMut%3CNodeIndex%3CIx%3E%3E">IndexMut<NodeIndex<Ix>></a><a href="#impl-Index%3CEdgeIndex%3CIx%3E%3E">Index<EdgeIndex<Ix>></a><a href="#impl-IndexMut%3CEdgeIndex%3CIx%3E%3E">IndexMut<EdgeIndex<Ix>></a><a href="#impl-Default">Default</a><a href="#impl-From%3CGraph%3CN%2C%20E%2C%20Ty%2C%20Ix%3E%3E">From<Graph<N, E, Ty, Ix>></a><a href="#impl-From%3CStableGraph%3CN%2C%20E%2C%20Ty%2C%20Ix%3E%3E">From<StableGraph<N, E, Ty, Ix>></a><a href="#impl-IntoNodeReferences">IntoNodeReferences</a><a href="#impl-IntoEdges">IntoEdges</a><a href="#impl-IntoEdgesDirected">IntoEdgesDirected</a><a href="#impl-IntoEdgeReferences">IntoEdgeReferences</a><a href="#impl-NodeIndexable">NodeIndexable</a><a href="#impl-GetAdjacencyMatrix">GetAdjacencyMatrix</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a></div></div><p class='location'><a href='../index.html'>petgraph</a>::<wbr><a href='index.html'>stable_graph</a></p><script>window.sidebarCurrent = {name: 'StableGraph', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
|
||
</nav>
|
||
|
||
<div class="theme-picker">
|
||
<button id="theme-picker" aria-label="Pick another theme!">
|
||
<img src="../../brush.svg" width="18" alt="Pick another theme!">
|
||
</button>
|
||
<div id="theme-choices"></div>
|
||
</div>
|
||
<script src="../../theme.js"></script>
|
||
<nav class="sub">
|
||
<form class="search-form js-only">
|
||
<div class="search-container">
|
||
<input class="search-input" name="search"
|
||
autocomplete="off"
|
||
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
||
type="search">
|
||
</div>
|
||
</form>
|
||
</nav>
|
||
|
||
<section id='main' class="content"><h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>petgraph</a>::<wbr><a href='index.html'>stable_graph</a>::<wbr><a class="struct" href=''>StableGraph</a></span><span class='out-of-band'><span id='render-detail'>
|
||
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
||
[<span class='inner'>−</span>]
|
||
</a>
|
||
</span><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#103-118' title='goto source code'>[src]</a></span></h1><div class="docblock type-decl"><pre class='rust struct'>pub struct StableGraph<N, E, Ty = <a class="enum" href="../../petgraph/enum.Directed.html" title="enum petgraph::Directed">Directed</a>, Ix = <a class="type" href="../../petgraph/graph/type.DefaultIx.html" title="type petgraph::graph::DefaultIx">DefaultIx</a>> { /* fields omitted */ }</pre></div><div class='docblock'><p><code>StableGraph<N, E, Ty, Ix></code> is a graph datastructure using an adjacency
|
||
list representation.</p>
|
||
<p>The graph <strong>does not invalidate</strong> any unrelated node or edge indices when
|
||
items are removed.</p>
|
||
<p><code>StableGraph</code> is parameterized over:</p>
|
||
<ul>
|
||
<li>Associated data <code>N</code> for nodes and <code>E</code> for edges, also called <em>weights</em>.
|
||
The associated data can be of arbitrary type.</li>
|
||
<li>Edge type <code>Ty</code> that determines whether the graph edges are directed or undirected.</li>
|
||
<li>Index type <code>Ix</code>, which determines the maximum size of the graph.</li>
|
||
</ul>
|
||
<p>The graph uses <strong>O(|V| + |E|)</strong> space, and allows fast node and edge insert
|
||
and efficient graph search.</p>
|
||
<p>It implements <strong>O(e')</strong> edge lookup and edge and node removals, where <strong>e'</strong>
|
||
is some local measure of edge count.</p>
|
||
<ul>
|
||
<li>
|
||
<p>Nodes and edges are each numbered in an interval from <em>0</em> to some number
|
||
<em>m</em>, but <em>not all</em> indices in the range are valid, since gaps are formed
|
||
by deletions.</p>
|
||
</li>
|
||
<li>
|
||
<p>You can select graph index integer type after the size of the graph. A smaller
|
||
size may have better performance.</p>
|
||
</li>
|
||
<li>
|
||
<p>Using indices allows mutation while traversing the graph, see <code>Dfs</code>.</p>
|
||
</li>
|
||
<li>
|
||
<p>The <code>StableGraph</code> is a regular rust collection and is <code>Send</code> and <code>Sync</code>
|
||
(as long as associated data <code>N</code> and <code>E</code> are).</p>
|
||
</li>
|
||
<li>
|
||
<p>Indices don't allow as much compile time checking as references.</p>
|
||
</li>
|
||
</ul>
|
||
<p>Depends on crate feature <code>stable_graph</code> (default). <em>Stable Graph is still
|
||
missing a few methods compared to Graph. You can contribute to help it
|
||
achieve parity.</em></p>
|
||
</div>
|
||
<h2 id='methods' class='small-section-header'>
|
||
Methods<a href='#methods' class='anchor'></a>
|
||
</h2>
|
||
<h3 id='impl' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E> <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, <a class="enum" href="../../petgraph/enum.Directed.html" title="enum petgraph::Directed">Directed</a>></code><a href='#impl' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#176-185' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.new' class='fnname'>new</a>() -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#182-184' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create a new <code>StableGraph</code> with directed edges.</p>
|
||
<p>This is a convenience method. See <code>StableGraph::with_capacity</code>
|
||
or <code>StableGraph::default</code> for a constructor that is generic in all the
|
||
type parameters of <code>StableGraph</code>.</p>
|
||
</div></div><h3 id='impl-1' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-1' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#187-994' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.with_capacity' class="method"><span id='with_capacity.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.with_capacity' class='fnname'>with_capacity</a>(nodes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, edges: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#192-200' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create a new <code>StableGraph</code> with estimated capacity.</p>
|
||
</div><h4 id='method.capacity' class="method"><span id='capacity.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.capacity' class='fnname'>capacity</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#203-205' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return the current node and edge capacity of the graph.</p>
|
||
</div><h4 id='method.clear' class="method"><span id='clear.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.clear' class='fnname'>clear</a>(&mut self)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#208-214' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Remove all nodes and edges</p>
|
||
</div><h4 id='method.clear_edges' class="method"><span id='clear_edges.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.clear_edges' class='fnname'>clear_edges</a>(&mut self)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#217-227' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Remove all edges</p>
|
||
</div><h4 id='method.node_count' class="method"><span id='node_count.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.node_count' class='fnname'>node_count</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#232-234' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return the number of nodes (vertices) in the graph.</p>
|
||
<p>Computes in <strong>O(1)</strong> time.</p>
|
||
</div><h4 id='method.edge_count' class="method"><span id='edge_count.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.edge_count' class='fnname'>edge_count</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#239-241' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return the number of edges in the graph.</p>
|
||
<p>Computes in <strong>O(1)</strong> time.</p>
|
||
</div><h4 id='method.is_directed' class="method"><span id='is_directed.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.is_directed' class='fnname'>is_directed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#245-247' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Whether the graph has directed edges or not.</p>
|
||
</div><h4 id='method.add_node' class="method"><span id='add_node.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_node' class='fnname'>add_node</a>(&mut self, weight: N) -> <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#257-271' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Add a node (also called vertex) with associated data <code>weight</code> to the graph.</p>
|
||
<p>Computes in <strong>O(1)</strong> time.</p>
|
||
<p>Return the index of the new node.</p>
|
||
<p><strong>Panics</strong> if the <code>StableGraph</code> is at the maximum number of nodes for
|
||
its index type.</p>
|
||
</div><h4 id='method.remove_node' class="method"><span id='remove_node.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.remove_node' class='fnname'>remove_node</a>(&mut self, a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><N></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#292-323' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Remove <code>a</code> from the graph if it exists, and return its weight.
|
||
If it doesn't exist in the graph, return <code>None</code>.</p>
|
||
<p>The node index <code>a</code> is invalidated, but none other.
|
||
Edge indices are invalidated as they would be following the removal of
|
||
each edge with an endpoint in <code>a</code>.</p>
|
||
<p>Computes in <strong>O(e')</strong> time, where <strong>e'</strong> is the number of affected
|
||
edges, including <em>n</em> calls to <code>.remove_edge()</code> where <em>n</em> is the number
|
||
of edges with an endpoint in <code>a</code>.</p>
|
||
</div><h4 id='method.contains_node' class="method"><span id='contains_node.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.contains_node' class='fnname'>contains_node</a>(&self, a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#325-327' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.add_edge' class="method"><span id='add_edge.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.add_edge' class='fnname'>add_edge</a>(<br> &mut self, <br> a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <br> b: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <br> weight: E<br>) -> <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#347-408' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Add an edge from <code>a</code> to <code>b</code> to the graph, with its associated
|
||
data <code>weight</code>.</p>
|
||
<p>Return the index of the new edge.</p>
|
||
<p>Computes in <strong>O(1)</strong> time.</p>
|
||
<p><strong>Panics</strong> if any of the nodes don't exist.<br>
|
||
<strong>Panics</strong> if the <code>StableGraph</code> is at the maximum number of edges for
|
||
its index type.</p>
|
||
<p><strong>Note:</strong> <code>StableGraph</code> allows adding parallel (“duplicate”) edges.</p>
|
||
</div><h4 id='method.update_edge' class="method"><span id='update_edge.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.update_edge' class='fnname'>update_edge</a>(<br> &mut self, <br> a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <br> b: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <br> weight: E<br>) -> <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#433-441' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Add or update an edge from <code>a</code> to <code>b</code>.
|
||
If the edge already exists, its weight is updated.</p>
|
||
<p>Return the index of the affected edge.</p>
|
||
<p>Computes in <strong>O(e')</strong> time, where <strong>e'</strong> is the number of edges
|
||
connected to <code>a</code> (and <code>b</code>, if the graph edges are undirected).</p>
|
||
<p><strong>Panics</strong> if any of the nodes don't exist.</p>
|
||
</div><h4 id='method.remove_edge' class="method"><span id='remove_edge.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.remove_edge' class='fnname'>remove_edge</a>(&mut self, e: <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><E></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#449-472' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Remove an edge and return its edge weight, or <code>None</code> if it didn't exist.</p>
|
||
<p>Invalidates the edge index <code>e</code> but no other.</p>
|
||
<p>Computes in <strong>O(e')</strong> time, where <strong>e'</strong> is the number of edges
|
||
conneced to the same endpoints as <code>e</code>.</p>
|
||
</div><h4 id='method.node_weight' class="method"><span id='node_weight.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.node_weight' class='fnname'>node_weight</a>(&self, a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>N></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#477-482' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Access the weight for node <code>a</code>.</p>
|
||
<p>Also available with indexing syntax: <code>&graph[a]</code>.</p>
|
||
</div><h4 id='method.node_weight_mut' class="method"><span id='node_weight_mut.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.node_weight_mut' class='fnname'>node_weight_mut</a>(&mut self, a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>N></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#487-492' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Access the weight for node <code>a</code>, mutably.</p>
|
||
<p>Also available with indexing syntax: <code>&mut graph[a]</code>.</p>
|
||
</div><h4 id='method.node_indices' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.NodeIndices.html" title="struct petgraph::stable_graph::NodeIndices">NodeIndices</a><'a, N, Ix></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.NodeIndices.html" title="struct petgraph::stable_graph::NodeIndices">NodeIndices</a><'a, N, Ix></h3><code class="content"><span class="where fmt-newline">impl<'a, N, Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/stable_graph/struct.NodeIndices.html" title="struct petgraph::stable_graph::NodeIndices">NodeIndices</a><'a, N, Ix></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>;</span></code></div></div><span id='node_indices.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.node_indices' class='fnname'>node_indices</a>(&self) -> <a class="struct" href="../../petgraph/stable_graph/struct.NodeIndices.html" title="struct petgraph::stable_graph::NodeIndices">NodeIndices</a><N, Ix></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#495-499' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return an iterator over the node indices of the graph</p>
|
||
</div><h4 id='method.edge_weight' class="method"><span id='edge_weight.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.edge_weight' class='fnname'>edge_weight</a>(&self, e: <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>E></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#504-509' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Access the weight for edge <code>e</code>.</p>
|
||
<p>Also available with indexing syntax: <code>&graph[e]</code>.</p>
|
||
</div><h4 id='method.edge_weight_mut' class="method"><span id='edge_weight_mut.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.edge_weight_mut' class='fnname'>edge_weight_mut</a>(&mut self, e: <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>E></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#514-519' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Access the weight for edge <code>e</code>, mutably</p>
|
||
<p>Also available with indexing syntax: <code>&mut graph[e]</code>.</p>
|
||
</div><h4 id='method.edge_endpoints' class="method"><span id='edge_endpoints.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.edge_endpoints' class='fnname'>edge_endpoints</a>(<br> &self, <br> e: <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#522-529' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Access the source and target nodes for <code>e</code>.</p>
|
||
</div><h4 id='method.edge_indices' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.EdgeIndices.html" title="struct petgraph::stable_graph::EdgeIndices">EdgeIndices</a><'a, E, Ix></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.EdgeIndices.html" title="struct petgraph::stable_graph::EdgeIndices">EdgeIndices</a><'a, E, Ix></h3><code class="content"><span class="where fmt-newline">impl<'a, E, Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/stable_graph/struct.EdgeIndices.html" title="struct petgraph::stable_graph::EdgeIndices">EdgeIndices</a><'a, E, Ix></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>;</span></code></div></div><span id='edge_indices.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.edge_indices' class='fnname'>edge_indices</a>(&self) -> <a class="struct" href="../../petgraph/stable_graph/struct.EdgeIndices.html" title="struct petgraph::stable_graph::EdgeIndices">EdgeIndices</a><E, Ix></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#532-536' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return an iterator over the node indices of the graph</p>
|
||
</div><h4 id='method.find_edge' class="method"><span id='find_edge.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.find_edge' class='fnname'>find_edge</a>(<br> &self, <br> a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <br> b: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#542-552' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Lookup an edge from <code>a</code> to <code>b</code>.</p>
|
||
<p>Computes in <strong>O(e')</strong> time, where <strong>e'</strong> is the number of edges
|
||
connected to <code>a</code> (and <code>b</code>, if the graph edges are undirected).</p>
|
||
</div><h4 id='method.find_edge_undirected' class="method"><span id='find_edge_undirected.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.find_edge_undirected' class='fnname'>find_edge_undirected</a>(<br> &self, <br> a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <br> b: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>, <a class="enum" href="../../petgraph/enum.Direction.html" title="enum petgraph::Direction">Direction</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#561-567' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Lookup an edge between <code>a</code> and <code>b</code>, in either direction.</p>
|
||
<p>If the graph is undirected, then this is equivalent to <code>.find_edge()</code>.</p>
|
||
<p>Return the edge index and its directionality, with <code>Outgoing</code> meaning
|
||
from <code>a</code> to <code>b</code> and <code>Incoming</code> the reverse,
|
||
or <code>None</code> if the edge does not exist.</p>
|
||
</div><h4 id='method.neighbors' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix></h3><code class="content"><span class="where fmt-newline">impl<'a, E, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix> <span class="where fmt-newline">where<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>;</span></code></div></div><span id='neighbors.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.neighbors' class='fnname'>neighbors</a>(&self, a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><E, Ix></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#582-584' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return an iterator of all nodes with an edge starting from <code>a</code>.</p>
|
||
<ul>
|
||
<li><code>Directed</code>: Outgoing edges from <code>a</code>.</li>
|
||
<li><code>Undirected</code>: All edges connected to <code>a</code>.</li>
|
||
</ul>
|
||
<p>Produces an empty iterator if the node doesn't exist.<br>
|
||
Iterator element type is <code>NodeIndex<Ix></code>.</p>
|
||
<p>Use <a href="struct.Neighbors.html#method.detach"><code>.neighbors(a).detach()</code></a> to get a neighbor walker that does
|
||
not borrow from the graph.</p>
|
||
</div><h4 id='method.neighbors_directed' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix></h3><code class="content"><span class="where fmt-newline">impl<'a, E, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix> <span class="where fmt-newline">where<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>;</span></code></div></div><span id='neighbors_directed.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.neighbors_directed' class='fnname'>neighbors_directed</a>(<br> &self, <br> a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <br> dir: <a class="enum" href="../../petgraph/enum.Direction.html" title="enum petgraph::Direction">Direction</a><br>) -> <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><E, Ix></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#601-611' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return an iterator of all neighbors that have an edge between them and <code>a</code>,
|
||
in the specified direction.
|
||
If the graph's edges are undirected, this is equivalent to <em>.neighbors(a)</em>.</p>
|
||
<ul>
|
||
<li><code>Directed</code>, <code>Outgoing</code>: All edges from <code>a</code>.</li>
|
||
<li><code>Directed</code>, <code>Incoming</code>: All edges to <code>a</code>.</li>
|
||
<li><code>Undirected</code>: All edges connected to <code>a</code>.</li>
|
||
</ul>
|
||
<p>Produces an empty iterator if the node doesn't exist.<br>
|
||
Iterator element type is <code>NodeIndex<Ix></code>.</p>
|
||
<p>Use <a href="struct.Neighbors.html#method.detach"><code>.neighbors_directed(a, dir).detach()</code></a> to get a neighbor walker that does
|
||
not borrow from the graph.</p>
|
||
</div><h4 id='method.neighbors_undirected' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix></h3><code class="content"><span class="where fmt-newline">impl<'a, E, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix> <span class="where fmt-newline">where<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>;</span></code></div></div><span id='neighbors_undirected.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.neighbors_undirected' class='fnname'>neighbors_undirected</a>(&self, a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><E, Ix></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#626-636' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return an iterator of all neighbors that have an edge between them and <code>a</code>,
|
||
in either direction.
|
||
If the graph's edges are undirected, this is equivalent to <em>.neighbors(a)</em>.</p>
|
||
<ul>
|
||
<li><code>Directed</code> and <code>Undirected</code>: All edges connected to <code>a</code>.</li>
|
||
</ul>
|
||
<p>Produces an empty iterator if the node doesn't exist.<br>
|
||
Iterator element type is <code>NodeIndex<Ix></code>.</p>
|
||
<p>Use <a href="struct.Neighbors.html#method.detach"><code>.neighbors_undirected(a).detach()</code></a> to get a neighbor walker that does
|
||
not borrow from the graph.</p>
|
||
</div><h4 id='method.edges' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'a, E, Ty, Ix></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'a, E, Ty, Ix></h3><code class="content"><span class="where fmt-newline">impl<'a, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/stable_graph/struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'a, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../petgraph/stable_graph/struct.EdgeReference.html" title="struct petgraph::stable_graph::EdgeReference">EdgeReference</a><'a, E, Ix>;</span></code></div></div><span id='edges.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.edges' class='fnname'>edges</a>(&self, a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="struct" href="../../petgraph/stable_graph/struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><E, Ty, Ix></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#645-647' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return an iterator of all edges of <code>a</code>.</p>
|
||
<ul>
|
||
<li><code>Directed</code>: Outgoing edges from <code>a</code>.</li>
|
||
<li><code>Undirected</code>: All edges connected to <code>a</code>.</li>
|
||
</ul>
|
||
<p>Produces an empty iterator if the node doesn't exist.<br>
|
||
Iterator element type is <code>EdgeReference<E, Ix></code>.</p>
|
||
</div><h4 id='method.edges_directed' class="method"><div class="important-traits"><div class='tooltip'>ⓘ<span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'a, E, Ty, Ix></span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/stable_graph/struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'a, E, Ty, Ix></h3><code class="content"><span class="where fmt-newline">impl<'a, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/stable_graph/struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'a, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="struct" href="../../petgraph/stable_graph/struct.EdgeReference.html" title="struct petgraph::stable_graph::EdgeReference">EdgeReference</a><'a, E, Ix>;</span></code></div></div><span id='edges_directed.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.edges_directed' class='fnname'>edges_directed</a>(<br> &self, <br> a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <br> dir: <a class="enum" href="../../petgraph/enum.Direction.html" title="enum petgraph::Direction">Direction</a><br>) -> <a class="struct" href="../../petgraph/stable_graph/struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><E, Ty, Ix></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#657-667' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return an iterator of all edges of <code>a</code>, in the specified direction.</p>
|
||
<ul>
|
||
<li><code>Directed</code>, <code>Outgoing</code>: All edges from <code>a</code>.</li>
|
||
<li><code>Directed</code>, <code>Incoming</code>: All edges to <code>a</code>.</li>
|
||
<li><code>Undirected</code>: All edges connected to <code>a</code>.</li>
|
||
</ul>
|
||
<p>Produces an empty iterator if the node <code>a</code> doesn't exist.<br>
|
||
Iterator element type is <code>EdgeReference<E, Ix></code>.</p>
|
||
</div><h4 id='method.index_twice_mut' class="method"><span id='index_twice_mut.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.index_twice_mut' class='fnname'>index_twice_mut</a><T, U>(<br> &mut self, <br> i: T, <br> j: U<br>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>&mut Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a>, &mut Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><T> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><U>,<br> T: <a class="trait" href="../../petgraph/graph/trait.GraphIndex.html" title="trait petgraph::graph::GraphIndex">GraphIndex</a>,<br> U: <a class="trait" href="../../petgraph/graph/trait.GraphIndex.html" title="trait petgraph::graph::GraphIndex">GraphIndex</a>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#692-708' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Index the <code>StableGraph</code> by two indices, any combination of
|
||
node or edge indices is fine.</p>
|
||
<p><strong>Panics</strong> if the indices are equal or if they are out of bounds.</p>
|
||
</div><h4 id='method.retain_nodes' class="method"><span id='retain_nodes.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.retain_nodes' class='fnname'>retain_nodes</a><F>(&mut self, visit: F) <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../../petgraph/graph/struct.Frozen.html" title="struct petgraph::graph::Frozen">Frozen</a><Self>, <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#725-733' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Keep all nodes that return <code>true</code> from the <code>visit</code> closure,
|
||
remove the others.</p>
|
||
<p><code>visit</code> is provided a proxy reference to the graph, so that
|
||
the graph can be walked and associated data modified.</p>
|
||
<p>The order nodes are visited is not specified.</p>
|
||
<p>The node indices of the removed nodes are invalidated, but none other.
|
||
Edge indices are invalidated as they would be following the removal of
|
||
each edge with an endpoint in a removed node.</p>
|
||
<p>Computes in <strong>O(n + e')</strong> time, where <strong>n</strong> is the number of node indices and
|
||
<strong>e'</strong> is the number of affected edges, including <em>n</em> calls to <code>.remove_edge()</code>
|
||
where <em>n</em> is the number of edges with an endpoint in a removed node.</p>
|
||
</div><h4 id='method.retain_edges' class="method"><span id='retain_edges.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.retain_edges' class='fnname'>retain_edges</a><F>(&mut self, visit: F) <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../../petgraph/graph/struct.Frozen.html" title="struct petgraph::graph::Frozen">Frozen</a><Self>, <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#747-757' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Keep all edges that return <code>true</code> from the <code>visit</code> closure,
|
||
remove the others.</p>
|
||
<p><code>visit</code> is provided a proxy reference to the graph, so that
|
||
the graph can be walked and associated data modified.</p>
|
||
<p>The order edges are visited is not specified.</p>
|
||
<p>The edge indices of the removed edes are invalidated, but none other.</p>
|
||
<p>Computes in <strong>O(e'')</strong> time, <strong>e'</strong> is the number of affected edges,
|
||
including the calls to <code>.remove_edge()</code> for each removed edge.</p>
|
||
</div><h4 id='method.from_edges' class="method"><span id='from_edges.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.from_edges' class='fnname'>from_edges</a><I>(iterable: I) -> Self <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>,<br> I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a>: <a class="trait" href="../../petgraph/trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a><E>,<br> <I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a> as <a class="trait" href="../../petgraph/trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a><E>>::<a class="type" href="../../petgraph/trait.IntoWeightedEdge.html#associatedtype.NodeId" title="type petgraph::IntoWeightedEdge::NodeId">NodeId</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>>,<br> N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#776-785' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create a new <code>StableGraph</code> from an iterable of edges.</p>
|
||
<p>Node weights <code>N</code> are set to default values.
|
||
Edge weights <code>E</code> may either be specified in the list,
|
||
or they are filled with default values.</p>
|
||
<p>Nodes are inserted automatically to match the edges.</p>
|
||
|
||
<pre class="rust rust-example-rendered">
|
||
<span class="kw">use</span> <span class="ident">petgraph</span>::<span class="ident">stable_graph</span>::<span class="ident">StableGraph</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">gr</span> <span class="op">=</span> <span class="ident">StableGraph</span>::<span class="op"><</span>(), <span class="ident">i32</span><span class="op">></span>::<span class="ident">from_edges</span>(<span class="kw-2">&</span>[
|
||
(<span class="number">0</span>, <span class="number">1</span>), (<span class="number">0</span>, <span class="number">2</span>), (<span class="number">0</span>, <span class="number">3</span>),
|
||
(<span class="number">1</span>, <span class="number">2</span>), (<span class="number">1</span>, <span class="number">3</span>),
|
||
(<span class="number">2</span>, <span class="number">3</span>),
|
||
]);</pre>
|
||
</div><h4 id='method.map' class="method"><span id='map.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.map' class='fnname'>map</a><'a, F, G, N2, E2>(<br> &'a self, <br> node_map: F, <br> edge_map: G<br>) -> <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N2, E2, Ty, Ix> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>N) -> N2,<br> G: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>E) -> E2, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#792-807' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create a new <code>StableGraph</code> by mapping node and
|
||
edge weights to new values.</p>
|
||
<p>The resulting graph has the same structure and the same
|
||
graph indices as <code>self</code>.</p>
|
||
</div><h4 id='method.filter_map' class="method"><span id='filter_map.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.filter_map' class='fnname'>filter_map</a><'a, F, G, N2, E2>(<br> &'a self, <br> node_map: F, <br> edge_map: G<br>) -> <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N2, E2, Ty, Ix> <span class="where fmt-newline">where<br> F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>N) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><N2>,<br> G: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>E) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><E2>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#820-863' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create a new <code>StableGraph</code> by mapping nodes and edges.
|
||
A node or edge may be mapped to <code>None</code> to exclude it from
|
||
the resulting graph.</p>
|
||
<p>Nodes are mapped first with the <code>node_map</code> closure, then
|
||
<code>edge_map</code> is called for the edges that have not had any endpoint
|
||
removed.</p>
|
||
<p>The resulting graph has the structure of a subgraph of the original graph.
|
||
Nodes and edges that are not removed maintain their old node or edge
|
||
indices.</p>
|
||
</div><h4 id='method.extend_with_edges' class="method"><span id='extend_with_edges.v' class='invisible'><table class='table-display'><tbody><tr><td><code>pub fn <a href='#method.extend_with_edges' class='fnname'>extend_with_edges</a><I>(&mut self, iterable: I) <span class="where fmt-newline">where<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>,<br> I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a>: <a class="trait" href="../../petgraph/trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a><E>,<br> <I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a> as <a class="trait" href="../../petgraph/trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a><E>>::<a class="type" href="../../petgraph/trait.IntoWeightedEdge.html#associatedtype.NodeId" title="type petgraph::IntoWeightedEdge::NodeId">NodeId</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>>,<br> N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#872-889' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Extend the graph from an iterable of edges.</p>
|
||
<p>Node weights <code>N</code> are set to default values.
|
||
Edge weights <code>E</code> may either be specified in the list,
|
||
or they are filled with default values.</p>
|
||
<p>Nodes are inserted automatically to match the edges.</p>
|
||
</div></div>
|
||
<h2 id='implementations' class='small-section-header'>
|
||
Trait Implementations<a href='#implementations' class='anchor'></a>
|
||
</h2>
|
||
<div id='implementations-list'>
|
||
<h3 id='impl-IntoNeighbors' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a, N, E: 'a, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.IntoNeighbors.html" title="trait petgraph::visit::IntoNeighbors">IntoNeighbors</a> for &'a <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-IntoNeighbors' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#111-119' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.Neighbors' class="type"><span id='Neighbors.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoNeighbors.html#associatedtype.Neighbors' class="type">Neighbors</a> = <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix></code></span></h4>
|
||
<h4 id='method.neighbors-1' class="method"><span id='neighbors.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.IntoNeighbors.html#tymethod.neighbors' class='fnname'>neighbors</a>(self, n: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -> Self::<a class="type" href="../../petgraph/visit/trait.IntoNeighbors.html#associatedtype.Neighbors" title="type petgraph::visit::IntoNeighbors::Neighbors">Neighbors</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#116-118' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return an iterator of the neighbors of node <code>a</code>.</p>
|
||
</div></div><h3 id='impl-IntoNeighborsDirected' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a, N, E: 'a, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.IntoNeighborsDirected.html" title="trait petgraph::visit::IntoNeighborsDirected">IntoNeighborsDirected</a> for &'a <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-IntoNeighborsDirected' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#195-205' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.NeighborsDirected' class="type"><span id='NeighborsDirected.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoNeighborsDirected.html#associatedtype.NeighborsDirected' class="type">NeighborsDirected</a> = <a class="struct" href="../../petgraph/stable_graph/struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix></code></span></h4>
|
||
<h4 id='method.neighbors_directed-1' class="method"><span id='neighbors_directed.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.IntoNeighborsDirected.html#tymethod.neighbors_directed' class='fnname'>neighbors_directed</a>(<br> self, <br> n: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <br> d: <a class="enum" href="../../petgraph/enum.Direction.html" title="enum petgraph::Direction">Direction</a><br>) -> Self::<a class="type" href="../../petgraph/visit/trait.IntoNeighborsDirected.html#associatedtype.NeighborsDirected" title="type petgraph::visit::IntoNeighborsDirected::NeighborsDirected">NeighborsDirected</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#200-204' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-IntoNodeIdentifiers' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a, N, E: 'a, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.IntoNodeIdentifiers.html" title="trait petgraph::visit::IntoNodeIdentifiers">IntoNodeIdentifiers</a> for &'a <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-IntoNodeIdentifiers' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#300-308' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.NodeIdentifiers' class="type"><span id='NodeIdentifiers.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoNodeIdentifiers.html#associatedtype.NodeIdentifiers' class="type">NodeIdentifiers</a> = <a class="struct" href="../../petgraph/stable_graph/struct.NodeIndices.html" title="struct petgraph::stable_graph::NodeIndices">NodeIndices</a><'a, N, Ix></code></span></h4>
|
||
<h4 id='method.node_identifiers' class="method"><span id='node_identifiers.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.IntoNodeIdentifiers.html#tymethod.node_identifiers' class='fnname'>node_identifiers</a>(self) -> Self::<a class="type" href="../../petgraph/visit/trait.IntoNodeIdentifiers.html#associatedtype.NodeIdentifiers" title="type petgraph::visit::IntoNodeIdentifiers::NodeIdentifiers">NodeIdentifiers</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#305-307' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-NodeCount' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.NodeCount.html" title="trait petgraph::visit::NodeCount">NodeCount</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-NodeCount' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#311-318' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.node_count-1' class="method"><span id='node_count.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.NodeCount.html#tymethod.node_count' class='fnname'>node_count</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#315-317' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-GraphProp' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.GraphProp.html" title="trait petgraph::visit::GraphProp">GraphProp</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-GraphProp' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#454-459' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.EdgeType' class="type"><span id='EdgeType.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.GraphProp.html#associatedtype.EdgeType' class="type">EdgeType</a> = Ty</code></span></h4>
|
||
<div class='docblock'><p>The kind edges in the graph.</p>
|
||
</div><h4 id='method.is_directed-1' class="method"><span id='is_directed.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.GraphProp.html#method.is_directed' class='fnname'>is_directed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#438-440' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-GraphBase' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.GraphBase.html" title="trait petgraph::visit::GraphBase">GraphBase</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-GraphBase' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#624-629' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.NodeId' class="type"><span id='NodeId.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId' class="type">NodeId</a> = <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix></code></span></h4>
|
||
<div class='docblock'><p>node identifier</p>
|
||
</div><h4 id='associatedtype.EdgeId' class="type"><span id='EdgeId.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.GraphBase.html#associatedtype.EdgeId' class="type">EdgeId</a> = <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix></code></span></h4>
|
||
<div class='docblock'><p>edge identifier</p>
|
||
</div></div><h3 id='impl-Visitable' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.Visitable.html" title="trait petgraph::visit::Visitable">Visitable</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-Visitable' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#632-644' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.Map' class="type"><span id='Map.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.Visitable.html#associatedtype.Map' class="type">Map</a> = <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></code></span></h4>
|
||
<div class='docblock'><p>The associated map type</p>
|
||
</div><h4 id='method.visit_map' class="method"><span id='visit_map.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.Visitable.html#tymethod.visit_map' class='fnname'>visit_map</a>(&self) -> <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#637-639' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create a new visitor map</p>
|
||
</div><h4 id='method.reset_map' class="method"><span id='reset_map.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.Visitable.html#tymethod.reset_map' class='fnname'>reset_map</a>(&self, map: &mut Self::<a class="type" href="../../petgraph/visit/trait.Visitable.html#associatedtype.Map" title="type petgraph::visit::Visitable::Map">Map</a>)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#640-643' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Reset the visitor map (and resize to new size of graph if needed)</p>
|
||
</div></div><h3 id='impl-Data' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.Data.html" title="trait petgraph::visit::Data">Data</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-Data' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#647-653' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.NodeWeight' class="type"><span id='NodeWeight.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.Data.html#associatedtype.NodeWeight' class="type">NodeWeight</a> = N</code></span></h4>
|
||
<h4 id='associatedtype.EdgeWeight' class="type"><span id='EdgeWeight.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.Data.html#associatedtype.EdgeWeight' class="type">EdgeWeight</a> = E</code></span></h4>
|
||
</div><h3 id='impl-DataMap' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/data/trait.DataMap.html" title="trait petgraph::data::DataMap">DataMap</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-DataMap' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#105-115' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.node_weight-1' class="method"><span id='node_weight.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/data/trait.DataMap.html#tymethod.node_weight' class='fnname'>node_weight</a>(&self, id: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.NodeWeight" title="type petgraph::visit::Data::NodeWeight">NodeWeight</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#109-111' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.edge_weight-1' class="method"><span id='edge_weight.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/data/trait.DataMap.html#tymethod.edge_weight' class='fnname'>edge_weight</a>(&self, id: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#112-114' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-DataMapMut' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/data/trait.DataMapMut.html" title="trait petgraph::data::DataMapMut">DataMapMut</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-DataMapMut' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#118-128' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.node_weight_mut-1' class="method"><span id='node_weight_mut.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/data/trait.DataMapMut.html#tymethod.node_weight_mut' class='fnname'>node_weight_mut</a>(&mut self, id: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.NodeWeight" title="type petgraph::visit::Data::NodeWeight">NodeWeight</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#122-124' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.edge_weight_mut-1' class="method"><span id='edge_weight_mut.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/data/trait.DataMapMut.html#tymethod.edge_weight_mut' class='fnname'>edge_weight_mut</a>(&mut self, id: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#125-127' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-Build' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/data/trait.Build.html" title="trait petgraph::data::Build">Build</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-Build' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#154-175' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.add_node-1' class="method"><span id='add_node.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/data/trait.Build.html#tymethod.add_node' class='fnname'>add_node</a>(&mut self, weight: Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.NodeWeight" title="type petgraph::visit::Data::NodeWeight">NodeWeight</a>) -> Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#158-160' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><h4 id='method.add_edge-1' class="method"><span id='add_edge.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/data/trait.Build.html#method.add_edge' class='fnname'>add_edge</a>(<br> &mut self, <br> a: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>, <br> b: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>, <br> weight: Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a>></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#161-167' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Add a new edge. If parallel edges (duplicate) are not allowed and the edge already exists, return <code>None</code>. <a href="../../petgraph/data/trait.Build.html#method.add_edge">Read more</a></p>
|
||
</div><h4 id='method.update_edge-1' class="method"><span id='update_edge.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/data/trait.Build.html#tymethod.update_edge' class='fnname'>update_edge</a>(<br> &mut self, <br> a: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>, <br> b: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>, <br> weight: Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a><br>) -> Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#168-174' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Add or update the edge from <code>a</code> to <code>b</code>. Return the id of the affected edge. <a href="../../petgraph/data/trait.Build.html#tymethod.update_edge">Read more</a></p>
|
||
</div></div><h3 id='impl-Create' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/data/trait.Create.html" title="trait petgraph::data::Create">Create</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-Create' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#219-226' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.with_capacity-1' class="method"><span id='with_capacity.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/data/trait.Create.html#tymethod.with_capacity' class='fnname'>with_capacity</a>(nodes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, edges: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#223-225' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-FromElements' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/data/trait.FromElements.html" title="trait petgraph::data::FromElements">FromElements</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-FromElements' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#315-325' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.from_elements' class="method"><span id='from_elements.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/data/trait.FromElements.html#method.from_elements' class='fnname'>from_elements</a><I>(iterable: I) -> Self <span class="where fmt-newline">where<br> Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br> I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a><Item = <a class="enum" href="../../petgraph/data/enum.Element.html" title="enum petgraph::data::Element">Element</a><Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.NodeWeight" title="type petgraph::visit::Data::NodeWeight">NodeWeight</a>, Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a>>>, </span></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#319-324' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-Debug' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,<br> E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-Debug' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#132-173' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#138-172' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
|
||
</div></div><h3 id='impl-Clone' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>> <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,<br> E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, </span></code><a href='#impl-Clone' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#997-1017' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='docblock'><p>The resulting cloned graph has the same graph indices as <code>self</code>.</p>
|
||
</div><div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&self) -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1000-1008' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&mut self, rhs: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Self)</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1010-1016' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||
</div></div><h3 id='impl-Index%3CNodeIndex%3CIx%3E%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-Index%3CNodeIndex%3CIx%3E%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1022-1030' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='docblock'><p>Index the <code>StableGraph</code> by <code>NodeIndex</code> to access node weights.</p>
|
||
<p><strong>Panics</strong> if the node doesn't exist.</p>
|
||
</div><div class='impl-items'><h4 id='associatedtype.Output' class="type"><span id='Output.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output' class="type">Output</a> = N</code></span></h4>
|
||
<div class='docblock'><p>The returned type after indexing.</p>
|
||
</div><h4 id='method.index' class="method"><span id='index.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index' class='fnname'>index</a>(&self, index: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>N</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1027-1029' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the indexing (<code>container[index]</code>) operation.</p>
|
||
</div></div><h3 id='impl-IndexMut%3CNodeIndex%3CIx%3E%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-IndexMut%3CNodeIndex%3CIx%3E%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1035-1043' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='docblock'><p>Index the <code>StableGraph</code> by <code>NodeIndex</code> to access node weights.</p>
|
||
<p><strong>Panics</strong> if the node doesn't exist.</p>
|
||
</div><div class='impl-items'><h4 id='method.index_mut' class="method"><span id='index_mut.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut' class='fnname'>index_mut</a>(&mut self, index: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>N</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1039-1041' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the mutable indexing (<code>container[index]</code>) operation.</p>
|
||
</div></div><h3 id='impl-Index%3CEdgeIndex%3CIx%3E%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-Index%3CEdgeIndex%3CIx%3E%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1048-1056' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='docblock'><p>Index the <code>StableGraph</code> by <code>EdgeIndex</code> to access edge weights.</p>
|
||
<p><strong>Panics</strong> if the edge doesn't exist.</p>
|
||
</div><div class='impl-items'><h4 id='associatedtype.Output-1' class="type"><span id='Output.t-1' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output' class="type">Output</a> = E</code></span></h4>
|
||
<div class='docblock'><p>The returned type after indexing.</p>
|
||
</div><h4 id='method.index-1' class="method"><span id='index.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index' class='fnname'>index</a>(&self, index: <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>E</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1053-1055' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the indexing (<code>container[index]</code>) operation.</p>
|
||
</div></div><h3 id='impl-IndexMut%3CEdgeIndex%3CIx%3E%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-IndexMut%3CEdgeIndex%3CIx%3E%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1061-1068' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='docblock'><p>Index the <code>StableGraph</code> by <code>EdgeIndex</code> to access edge weights.</p>
|
||
<p><strong>Panics</strong> if the edge doesn't exist.</p>
|
||
</div><div class='impl-items'><h4 id='method.index_mut-1' class="method"><span id='index_mut.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut' class='fnname'>index_mut</a>(&mut self, index: <a class="struct" href="../../petgraph/graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>E</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1065-1067' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the mutable indexing (<code>container[index]</code>) operation.</p>
|
||
</div></div><h3 id='impl-Default' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-Default' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1071-1076' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='docblock'><p>Create a new empty <code>StableGraph</code>.</p>
|
||
</div><div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1075' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Returns the "default value" for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||
</div></div><h3 id='impl-From%3CGraph%3CN%2C%20E%2C%20Ty%2C%20Ix%3E%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../petgraph/graph/struct.Graph.html" title="struct petgraph::graph::Graph">Graph</a><N, E, Ty, Ix>> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-From%3CGraph%3CN%2C%20E%2C%20Ty%2C%20Ix%3E%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1084-1106' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='docblock'><p>Convert a <code>Graph</code> into a <code>StableGraph</code></p>
|
||
<p>Computes in <strong>O(|V| + |E|)</strong> time.</p>
|
||
<p>The resulting graph has the same node and edge indices as
|
||
the original graph.</p>
|
||
</div><div class='impl-items'><h4 id='method.from' class="method"><span id='from.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(g: <a class="struct" href="../../petgraph/graph/struct.Graph.html" title="struct petgraph::graph::Graph">Graph</a><N, E, Ty, Ix>) -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1088-1105' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-From%3CStableGraph%3CN%2C%20E%2C%20Ty%2C%20Ix%3E%3E' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix>> for <a class="struct" href="../../petgraph/graph/struct.Graph.html" title="struct petgraph::graph::Graph">Graph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-From%3CStableGraph%3CN%2C%20E%2C%20Ty%2C%20Ix%3E%3E' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1118-1145' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='docblock'><p>Convert a <code>StableGraph</code> into a <code>Graph</code></p>
|
||
<p>Computes in <strong>O(|V| + |E|)</strong> time.</p>
|
||
<p>This translates the stable graph into a graph with node and edge indices in
|
||
a compact interval without holes (like <code>Graph</code>s always are).</p>
|
||
<p>Only if the stable graph had no vacancies after deletions (if node bound was
|
||
equal to node count, and the same for edges), would the resulting graph have
|
||
the same node and edge indices as the input.</p>
|
||
</div><div class='impl-items'><h4 id='method.from-1' class="method"><span id='from.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from' class='fnname'>from</a>(graph: <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix>) -> Self</code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1122-1144' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Performs the conversion.</p>
|
||
</div></div><h3 id='impl-IntoNodeReferences' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a, N, E, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.IntoNodeReferences.html" title="trait petgraph::visit::IntoNodeReferences">IntoNodeReferences</a> for &'a <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-IntoNodeReferences' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1147-1158' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.NodeRef' class="type"><span id='NodeRef.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoNodeReferences.html#associatedtype.NodeRef' class="type">NodeRef</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&'a </a>N<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></span></h4>
|
||
<h4 id='associatedtype.NodeReferences' class="type"><span id='NodeReferences.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoNodeReferences.html#associatedtype.NodeReferences' class="type">NodeReferences</a> = <a class="struct" href="../../petgraph/stable_graph/struct.NodeReferences.html" title="struct petgraph::stable_graph::NodeReferences">NodeReferences</a><'a, N, Ix></code></span></h4>
|
||
<h4 id='method.node_references' class="method"><span id='node_references.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.IntoNodeReferences.html#tymethod.node_references' class='fnname'>node_references</a>(self) -> Self::<a class="type" href="../../petgraph/visit/trait.IntoNodeReferences.html#associatedtype.NodeReferences" title="type petgraph::visit::IntoNodeReferences::NodeReferences">NodeReferences</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1153-1157' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-IntoEdges' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a, N, E, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.IntoEdges.html" title="trait petgraph::visit::IntoEdges">IntoEdges</a> for &'a <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-IntoEdges' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1239-1247' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.Edges' class="type"><span id='Edges.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoEdges.html#associatedtype.Edges' class="type">Edges</a> = <a class="struct" href="../../petgraph/stable_graph/struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'a, E, Ty, Ix></code></span></h4>
|
||
<h4 id='method.edges-1' class="method"><span id='edges.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.IntoEdges.html#tymethod.edges' class='fnname'>edges</a>(self, a: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -> Self::<a class="type" href="../../petgraph/visit/trait.IntoEdges.html#associatedtype.Edges" title="type petgraph::visit::IntoEdges::Edges">Edges</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1244-1246' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-IntoEdgesDirected' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a, N, E, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.IntoEdgesDirected.html" title="trait petgraph::visit::IntoEdgesDirected">IntoEdgesDirected</a> for &'a <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-IntoEdgesDirected' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1249-1257' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.EdgesDirected' class="type"><span id='EdgesDirected.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoEdgesDirected.html#associatedtype.EdgesDirected' class="type">EdgesDirected</a> = <a class="struct" href="../../petgraph/stable_graph/struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'a, E, Ty, Ix></code></span></h4>
|
||
<h4 id='method.edges_directed-1' class="method"><span id='edges_directed.v-1' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.IntoEdgesDirected.html#tymethod.edges_directed' class='fnname'>edges_directed</a>(self, a: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>, dir: <a class="enum" href="../../petgraph/enum.Direction.html" title="enum petgraph::Direction">Direction</a>) -> Self::<a class="type" href="../../petgraph/visit/trait.IntoEdgesDirected.html#associatedtype.EdgesDirected" title="type petgraph::visit::IntoEdgesDirected::EdgesDirected">EdgesDirected</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1254-1256' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4></div><h3 id='impl-IntoEdgeReferences' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<'a, N: 'a, E: 'a, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.IntoEdgeReferences.html" title="trait petgraph::visit::IntoEdgeReferences">IntoEdgeReferences</a> for &'a <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-IntoEdgeReferences' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1334-1350' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='associatedtype.EdgeRef' class="type"><span id='EdgeRef.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoEdgeReferences.html#associatedtype.EdgeRef' class="type">EdgeRef</a> = <a class="struct" href="../../petgraph/stable_graph/struct.EdgeReference.html" title="struct petgraph::stable_graph::EdgeReference">EdgeReference</a><'a, E, Ix></code></span></h4>
|
||
<h4 id='associatedtype.EdgeReferences' class="type"><span id='EdgeReferences.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoEdgeReferences.html#associatedtype.EdgeReferences' class="type">EdgeReferences</a> = <a class="struct" href="../../petgraph/stable_graph/struct.EdgeReferences.html" title="struct petgraph::stable_graph::EdgeReferences">EdgeReferences</a><'a, E, Ix></code></span></h4>
|
||
<h4 id='method.edge_references' class="method"><span id='edge_references.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.IntoEdgeReferences.html#tymethod.edge_references' class='fnname'>edge_references</a>(self) -> Self::<a class="type" href="../../petgraph/visit/trait.IntoEdgeReferences.html#associatedtype.EdgeReferences" title="type petgraph::visit::IntoEdgeReferences::EdgeReferences">EdgeReferences</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1344-1348' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create an iterator over all edges in the graph, in indexed order.</p>
|
||
<p>Iterator element type is <code>EdgeReference<E, Ix></code>.</p>
|
||
</div></div><h3 id='impl-NodeIndexable' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.NodeIndexable.html" title="trait petgraph::visit::NodeIndexable">NodeIndexable</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-NodeIndexable' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1550-1562' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='impl-items'><h4 id='method.node_bound' class="method"><span id='node_bound.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.NodeIndexable.html#tymethod.node_bound' class='fnname'>node_bound</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1555-1559' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return an upper bound of the node indices in the graph</p>
|
||
</div><h4 id='method.to_index' class="method"><span id='to_index.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.NodeIndexable.html#tymethod.to_index' class='fnname'>to_index</a>(&self, ix: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1560' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Convert <code>a</code> to an integer index.</p>
|
||
</div><h4 id='method.from_index' class="method"><span id='from_index.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.NodeIndexable.html#tymethod.from_index' class='fnname'>from_index</a>(&self, ix: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -> Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1561' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Convert <code>i</code> to a node index</p>
|
||
</div></div><h3 id='impl-GetAdjacencyMatrix' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="../../petgraph/visit/trait.GetAdjacencyMatrix.html" title="trait petgraph::visit::GetAdjacencyMatrix">GetAdjacencyMatrix</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br> Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>, </span></code><a href='#impl-GetAdjacencyMatrix' class='anchor'></a></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/traits_graph.rs.html#56-83' title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><div class='docblock'><p>The adjacency matrix for <strong>Graph</strong> is a bitmap that's computed by
|
||
<code>.adjacency_matrix()</code>.</p>
|
||
</div><div class='impl-items'><h4 id='associatedtype.AdjMatrix' class="type"><span id='AdjMatrix.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.GetAdjacencyMatrix.html#associatedtype.AdjMatrix' class="type">AdjMatrix</a> = <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></code></span></h4>
|
||
<div class='docblock'><p>The associated adjacency matrix type</p>
|
||
</div><h4 id='method.adjacency_matrix' class="method"><span id='adjacency_matrix.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.GetAdjacencyMatrix.html#tymethod.adjacency_matrix' class='fnname'>adjacency_matrix</a>(&self) -> <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/traits_graph.rs.html#62-75' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Create the adjacency matrix</p>
|
||
</div><h4 id='method.is_adjacent' class="method"><span id='is_adjacent.v' class='invisible'><table class='table-display'><tbody><tr><td><code>fn <a href='../../petgraph/visit/trait.GetAdjacencyMatrix.html#tymethod.is_adjacent' class='fnname'>is_adjacent</a>(<br> &self, <br> matrix: &<a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a>, <br> a: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <br> b: <a class="struct" href="../../petgraph/graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix><br>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/traits_graph.rs.html#77-82' title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><div class='docblock'><p>Return true if there is an edge from <code>a</code> to <code>b</code>, false otherwise. <a href="../../petgraph/visit/trait.GetAdjacencyMatrix.html#tymethod.is_adjacent">Read more</a></p>
|
||
</div></div></div>
|
||
<h2 id='synthetic-implementations' class='small-section-header'>
|
||
Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a>
|
||
</h2>
|
||
<div id='synthetic-implementations-list'>
|
||
<h3 id='impl-Send' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> Ix: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,<br> Ty: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>, </span></code><a href='#impl-Send' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><span class='in-band'><table class='table-display'><tbody><tr><td><code>impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../petgraph/stable_graph/struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix> <span class="where fmt-newline">where<br> E: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> Ix: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,<br> Ty: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></code><a href='#impl-Sync' class='anchor'></a></span></td><td><span class='out-of-band'></span></td></tr></tbody></table></h3><div class='impl-items'></div></div></section>
|
||
<section id='search' class="content hidden"></section>
|
||
|
||
<section class="footer"></section>
|
||
|
||
<aside id="help" class="hidden">
|
||
<div>
|
||
<h1 class="hidden">Help</h1>
|
||
|
||
<div class="shortcuts">
|
||
<h2>Keyboard Shortcuts</h2>
|
||
|
||
<dl>
|
||
<dt><kbd>?</kbd></dt>
|
||
<dd>Show this help dialog</dd>
|
||
<dt><kbd>S</kbd></dt>
|
||
<dd>Focus the search field</dd>
|
||
<dt><kbd>↑</kbd></dt>
|
||
<dd>Move up in search results</dd>
|
||
<dt><kbd>↓</kbd></dt>
|
||
<dd>Move down in search results</dd>
|
||
<dt><kbd>↹</kbd></dt>
|
||
<dd>Switch tab</dd>
|
||
<dt><kbd>⏎</kbd></dt>
|
||
<dd>Go to active search result</dd>
|
||
<dt><kbd>+</kbd></dt>
|
||
<dd>Expand all sections</dd>
|
||
<dt><kbd>-</kbd></dt>
|
||
<dd>Collapse all sections</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<div class="infos">
|
||
<h2>Search Tricks</h2>
|
||
|
||
<p>
|
||
Prefix searches with a type followed by a colon (e.g.
|
||
<code>fn:</code>) to restrict the search to a given type.
|
||
</p>
|
||
|
||
<p>
|
||
Accepted types are: <code>fn</code>, <code>mod</code>,
|
||
<code>struct</code>, <code>enum</code>,
|
||
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
||
and <code>const</code>.
|
||
</p>
|
||
|
||
<p>
|
||
Search functions by type signature (e.g.
|
||
<code>vec -> usize</code> or <code>* -> vec</code>)
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</aside>
|
||
|
||
|
||
|
||
<script>
|
||
window.rootPath = "../../";
|
||
window.currentCrate = "petgraph";
|
||
</script>
|
||
<script src="../../main.js"></script>
|
||
<script defer src="../../search-index.js"></script>
|
||
</body>
|
||
</html> |