|
|
<!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="`StableGraph<N, E, Ty, Ix>` is a graph datastructure using an adjacency list representation."><title>StableGraph in petgraph::stable_graph - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="petgraph" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">☰</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../petgraph/index.html">petgraph</a><span class="version">0.6.4</span></h2></div><h2 class="location"><a href="#">StableGraph</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.add_edge">add_edge</a></li><li><a href="#method.add_node">add_node</a></li><li><a href="#method.capacity">capacity</a></li><li><a href="#method.clear">clear</a></li><li><a href="#method.clear_edges">clear_edges</a></li><li><a href="#method.contains_edge">contains_edge</a></li><li><a href="#method.contains_node">contains_node</a></li><li><a href="#method.edge_count">edge_count</a></li><li><a href="#method.edge_endpoints">edge_endpoints</a></li><li><a href="#method.edge_indices">edge_indices</a></li><li><a href="#method.edge_weight">edge_weight</a></li><li><a href="#method.edge_weight_mut">edge_weight_mut</a></li><li><a href="#method.edge_weights">edge_weights</a></li><li><a href="#method.edge_weights_mut">edge_weights_mut</a></li><li><a href="#method.edges">edges</a></li><li><a href="#method.edges_connecting">edges_connecting</a></li><li><a href="#method.edges_directed">edges_directed</a></li><li><a href="#method.extend_with_edges">extend_with_edges</a></li><li><a href="#method.externals">externals</a></li><li><a href="#method.filter_map">filter_map</a></li><li><a href="#method.find_edge">find_edge</a></li><li><a href="#method.find_edge_undirected">find_edge_undirected</a></li><li><a href="#method.from_edges">from_edges</a></li><li><a href="#method.index_twice_mut">index_twice_mut</a></li><li><a href="#method.is_directed">is_directed</a></li><li><a href="#method.map">map</a></li><li><a href="#method.neighbors">neighbors</a></li><li><a href="#method.neighbors_directed">neighbors_directed</a></li><li><a href="#method.neighbors_undirected">neighbors_undirected</a></li><li><a href="#method.new">new</a></li><li><a href="#method.node_count">node_count</a></li><li><a href="#method.node_indices">node_indices</a></li><li><a href="#method.node_weight">node_weight</a></li><li><a href="#method.node_weight_mut">node_weight_mut</a></li><li><a href="#method.node_weights">node_weights</a></li><li><a href="#method.node_weights_mut">node_weights_mut</a></li><li><a href="#method.remove_edge">remove_edge</a></li><li><a href="#method.remove_node">remove_node</a></li><li><a href="#method.retain_edges">retain_edges</a></li><li><a href="#method.retain_nodes">retain_nodes</a></li><li><a href="#method.reverse">reverse</a></li><li><a href="#method.update_edge">update_edge</a></li><li><a href="#method.with_capacity">with_capacity</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Build-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Build</a></li><li><a href="#impl-Clone-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Clone</a></li><li><a href="#impl-Create-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Create</a></li><li><a href="#impl-Data-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Data</a></li><li><a href="#impl-DataMap-for-StableGraph%3CN,+E,+Ty,+Ix%3E">DataMap</a></li><li><a href="#impl-DataMapMut-for-StableGraph%3CN,+E,+Ty,+Ix%3E">DataMapMut</a></li><li><a href="#impl-Debug-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Debug</a></li><li><a href="#impl-Default-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Default</a></li><li><a href="#impl-EdgeCount-for-StableGraph%3CN,+E,+Ty,+Ix%3E">EdgeCount</a></li><li><a href="#impl-EdgeIndexable-for-StableGraph%3CN,+E,+Ty,+Ix%3E">EdgeIndexable</a></li><li><a href="#impl-From%3CGraph%3CN,+E,+Ty,+Ix%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E">From<Graph<N, E, Ty, Ix>></a></li><li><a href="#impl-From%3CStableGraph%3CN,+E,+Ty,+Ix%3E%3E-for-Graph%3CN,+E,+Ty,+Ix%3E">From<StableGraph<N, E, Ty, Ix>></a></li><li><a href="#impl-FromElements-for-StableGraph%3CN,+E,+Ty,+Ix%3E">FromElements</a></li><li><a href="#impl-GetAdjacencyMatrix-for-StableGraph%3CN,+E,+Ty,+Ix%3E">GetAdjacencyMatrix</a></li><li><a href="#impl-GraphBase-for-StableGraph%3CN,+E,+Ty,+Ix%3E">GraphBase</a></li><li><a href="#impl-GraphProp-for-StableGraph%3CN,+E,+Ty,+Ix%3E">GraphProp</a></li><li><a href="#impl-Index%3CEdgeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Index<EdgeIndex<Ix>></a></li><li><a href="#impl-Index%3CNodeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Index<NodeIndex<Ix>></a></li><li><a href="#impl-IndexMut%3CEdgeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E">IndexMut<EdgeIndex<Ix>></a></li><li><a href="#impl-IndexMut%3CNodeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E">IndexMut<NodeIndex<Ix>></a></li><li><a href="#impl-IntoEdgeReferences-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E">IntoEdgeReferences</a></li><li><a href="#impl-IntoEdges-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E">IntoEdges</a></li><li><a href="#impl-IntoEdgesDirected-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E">IntoEdgesDirected</a></li><li><a href="#impl-IntoNeighbors-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E">IntoNeighbors</a></li><li><a href="#impl-IntoNeighborsDirected-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E">IntoNeighborsDirected</a></li><li><a href="#impl-IntoNodeIdentifiers-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E">IntoNodeIdentifiers</a></li><li><a href="#impl-IntoNodeReferences-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E">IntoNodeReferences</a></li><li><a href="#impl-NodeCount-for-StableGraph%3CN,+E,+Ty,+Ix%3E">NodeCount</a></li><li><a href="#impl-NodeIndexable-for-StableGraph%3CN,+E,+Ty,+Ix%3E">NodeIndexable</a></li><li><a href="#impl-Visitable-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Visitable</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-RefUnwindSafe-for-StableGraph%3CN,+E,+Ty,+Ix%3E">RefUnwindSafe</a></li><li><a href="#impl-Send-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Send</a></li><li><a href="#impl-Sync-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Sync</a></li><li><a href="#impl-Unpin-for-StableGraph%3CN,+E,+Ty,+Ix%3E">Unpin</a></li><li><a href="#impl-UnwindSafe-for-StableGraph%3CN,+E,+Ty,+Ix%3E">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T">Into<U></a></li><li><a href="#impl-ToOwned-for-T">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T">TryInto<U></a></li></ul></section><h2><a href="index.html">In petgraph::stable_graph</a></h2></div></nav><div class="sidebar-resizer"></div>
|
|
|
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../petgraph/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Struct <a href="../index.html">petgraph</a>::<wbr><a href="index.html">stable_graph</a>::<wbr><a class="struct" href="#">StableGraph</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#74-92">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>−</span>]</button></span></div><pre class="rust item-decl"><code>pub struct StableGraph<N, E, Ty = <a class="enum" href="../enum.Directed.html" title="enum petgraph::Directed">Directed</a>, Ix = <a class="type" href="../graph/type.DefaultIx.html" title="type petgraph::graph::DefaultIx">DefaultIx</a>> { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><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></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-StableGraph%3CN,+E%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#168-177">source</a><a href="#impl-StableGraph%3CN,+E%3E" class="anchor">§</a><h3 class="code-header">impl<N, E> <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, <a class="enum" href="../enum.Directed.html" title="enum petgraph::Directed">Directed</a>></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#174-176">source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></summary><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></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#179-1131">source</a><a href="#impl-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_capacity" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#185-193">source</a><h4 class="code-header">pub fn <a href="#method.with_capacity" class="fn">with_capacity</a>(nodes: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, edges: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></summary><div class="docblock"><p>Create a new <code>StableGraph</code> with estimated capacity.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.capacity" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#196-198">source</a><h4 class="code-header">pub fn <a href="#method.capacity" class="fn">capacity</a>(&self) -> (<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>)</h4></section></summary><div class="docblock"><p>Return the current node and edge capacity of the graph.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.reverse" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#201-212">source</a><h4 class="code-header">pub fn <a href="#method.reverse" class="fn">reverse</a>(&mut self)</h4></section></summary><div class="docblock"><p>Reverse the direction of all edges</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#215-221">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fn">clear</a>(&mut self)</h4></section></summary><div class="docblock"><p>Remove all nodes and edges</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear_edges" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#224-234">source</a><h4 class="code-header">pub fn <a href="#method.clear_edges" class="fn">clear_edges</a>(&mut self)</h4></section></summary><div class="docblock"><p>Remove all edges</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.node_count" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#239-241">source</a><h4 class="code-header">pub fn <a href="#method.node_count" class="fn">node_count</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Return the number of nodes (vertices) in the graph.</p>
|
|
|
<p>Computes in <strong>O(1)</strong> time.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.edge_count" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#246-248">source</a><h4 class="code-header">pub fn <a href="#method.edge_count" class="fn">edge_count</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Return the number of edges in the graph.</p>
|
|
|
<p>Computes in <strong>O(1)</strong> time.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.is_directed" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#252-254">source</a><h4 class="code-header">pub fn <a href="#method.is_directed" class="fn">is_directed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Whether the graph has directed edges or not.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_node" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#264-273">source</a><h4 class="code-header">pub fn <a href="#method.add_node" class="fn">add_node</a>(&mut self, weight: N) -> <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.remove_node" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#297-325">source</a><h4 class="code-header">pub fn <a href="#method.remove_node" class="fn">remove_node</a>(&mut self, a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><N></h4></section></summary><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></details><section id="method.contains_node" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#327-329">source</a><h4 class="code-header">pub fn <a href="#method.contains_node" class="fn">contains_node</a>(&self, a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.add_edge" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#351-413">source</a><h4 class="code-header">pub fn <a href="#method.add_edge" class="fn">add_edge</a>(
|
|
|
&mut self,
|
|
|
a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
b: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
weight: E
|
|
|
) -> <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.update_edge" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#438-444">source</a><h4 class="code-header">pub fn <a href="#method.update_edge" class="fn">update_edge</a>(
|
|
|
&mut self,
|
|
|
a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
b: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
weight: E
|
|
|
) -> <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.remove_edge" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#452-475">source</a><h4 class="code-header">pub fn <a href="#method.remove_edge" class="fn">remove_edge</a>(&mut self, e: <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><E></h4></section></summary><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
|
|
|
connected to the same endpoints as <code>e</code>.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.node_weight" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#480-485">source</a><h4 class="code-header">pub fn <a href="#method.node_weight" class="fn">node_weight</a>(&self, a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&N</a>></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.node_weight_mut" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#490-495">source</a><h4 class="code-header">pub fn <a href="#method.node_weight_mut" class="fn">node_weight_mut</a>(&mut self, a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut N</a>></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.node_weights" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#501-505">source</a><h4 class="code-header">pub fn <a href="#method.node_weights" class="fn">node_weights</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&N</a>></h4></section></summary><div class="docblock"><p>Return an iterator yielding immutable access to all node weights.</p>
|
|
|
<p>The order in which weights are yielded matches the order of their node
|
|
|
indices.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.node_weights_mut" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#510-514">source</a><h4 class="code-header">pub fn <a href="#method.node_weights_mut" class="fn">node_weights_mut</a>(&mut self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut N</a>></h4></section></summary><div class="docblock"><p>Return an iterator yielding mutable access to all node weights.</p>
|
|
|
<p>The order in which weights are yielded matches the order of their node
|
|
|
indices.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.node_indices" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#517-521">source</a><h4 class="code-header">pub fn <a href="#method.node_indices" class="fn">node_indices</a>(&self) -> <a class="struct" href="struct.NodeIndices.html" title="struct petgraph::stable_graph::NodeIndices">NodeIndices</a><'_, N, Ix> <a href="#" class="tooltip" data-notable-ty="NodeIndices<'_, N, Ix>">ⓘ</a></h4></section></summary><div class="docblock"><p>Return an iterator over the node indices of the graph</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.edge_weight" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#526-531">source</a><h4 class="code-header">pub fn <a href="#method.edge_weight" class="fn">edge_weight</a>(&self, e: <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&E</a>></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.edge_weight_mut" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#536-541">source</a><h4 class="code-header">pub fn <a href="#method.edge_weight_mut" class="fn">edge_weight_mut</a>(&mut self, e: <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut E</a>></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.edge_weights" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#547-551">source</a><h4 class="code-header">pub fn <a href="#method.edge_weights" class="fn">edge_weights</a>(&self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&E</a>></h4></section></summary><div class="docblock"><p>Return an iterator yielding immutable access to all edge weights.</p>
|
|
|
<p>The order in which weights are yielded matches the order of their edge
|
|
|
indices.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.edge_weights_mut" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#556-560">source</a><h4 class="code-header">pub fn <a href="#method.edge_weights_mut" class="fn">edge_weights_mut</a>(&mut self) -> impl <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut E</a>></h4></section></summary><div class="docblock"><p>Return an iterator yielding mutable access to all edge weights.</p>
|
|
|
<p>The order in which weights are yielded matches the order of their edge
|
|
|
indices.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.edge_endpoints" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#563-568">source</a><h4 class="code-header">pub fn <a href="#method.edge_endpoints" class="fn">edge_endpoints</a>(
|
|
|
&self,
|
|
|
e: <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>
|
|
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>)></h4></section></summary><div class="docblock"><p>Access the source and target nodes for <code>e</code>.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.edge_indices" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#571-575">source</a><h4 class="code-header">pub fn <a href="#method.edge_indices" class="fn">edge_indices</a>(&self) -> <a class="struct" href="struct.EdgeIndices.html" title="struct petgraph::stable_graph::EdgeIndices">EdgeIndices</a><'_, E, Ix> <a href="#" class="tooltip" data-notable-ty="EdgeIndices<'_, E, Ix>">ⓘ</a></h4></section></summary><div class="docblock"><p>Return an iterator over the edge indices of the graph</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.edges_connecting" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#583-593">source</a><h4 class="code-header">pub fn <a href="#method.edges_connecting" class="fn">edges_connecting</a>(
|
|
|
&self,
|
|
|
a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
b: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>
|
|
|
) -> <a class="struct" href="struct.EdgesConnecting.html" title="struct petgraph::stable_graph::EdgesConnecting">EdgesConnecting</a><'_, E, Ty, Ix> <a href="#" class="tooltip" data-notable-ty="EdgesConnecting<'_, E, Ty, Ix>">ⓘ</a></h4></section></summary><div class="docblock"><p>Return an iterator over all the edges connecting <code>a</code> and <code>b</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>Iterator element type is <code>EdgeReference<E, Ix></code>.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.contains_edge" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#599-601">source</a><h4 class="code-header">pub fn <a href="#method.contains_edge" class="fn">contains_edge</a>(&self, a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, b: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Lookup if there is 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></details><details class="toggle method-toggle" open><summary><section id="method.find_edge" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#607-616">source</a><h4 class="code-header">pub fn <a href="#method.find_edge" class="fn">find_edge</a>(
|
|
|
&self,
|
|
|
a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
b: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>
|
|
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.find_edge_undirected" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#625-634">source</a><h4 class="code-header">pub fn <a href="#method.find_edge_undirected" class="fn">find_edge_undirected</a>(
|
|
|
&self,
|
|
|
a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
b: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>
|
|
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><(<a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>, <a class="enum" href="../enum.Direction.html" title="enum petgraph::Direction">Direction</a>)></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.neighbors" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#648-650">source</a><h4 class="code-header">pub fn <a href="#method.neighbors" class="fn">neighbors</a>(&self, a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="struct" href="struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'_, E, Ix> <a href="#" class="tooltip" data-notable-ty="Neighbors<'_, E, Ix>">ⓘ</a></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.neighbors_directed" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#667-675">source</a><h4 class="code-header">pub fn <a href="#method.neighbors_directed" class="fn">neighbors_directed</a>(
|
|
|
&self,
|
|
|
a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
dir: <a class="enum" href="../enum.Direction.html" title="enum petgraph::Direction">Direction</a>
|
|
|
) -> <a class="struct" href="struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'_, E, Ix> <a href="#" class="tooltip" data-notable-ty="Neighbors<'_, E, Ix>">ⓘ</a></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.neighbors_undirected" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#690-699">source</a><h4 class="code-header">pub fn <a href="#method.neighbors_undirected" class="fn">neighbors_undirected</a>(&self, a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="struct" href="struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'_, E, Ix> <a href="#" class="tooltip" data-notable-ty="Neighbors<'_, E, Ix>">ⓘ</a></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.edges" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#708-710">source</a><h4 class="code-header">pub fn <a href="#method.edges" class="fn">edges</a>(&self, a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="struct" href="struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'_, E, Ty, Ix> <a href="#" class="tooltip" data-notable-ty="Edges<'_, E, Ty, Ix>">ⓘ</a></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.edges_directed" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#723-734">source</a><h4 class="code-header">pub fn <a href="#method.edges_directed" class="fn">edges_directed</a>(
|
|
|
&self,
|
|
|
a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
dir: <a class="enum" href="../enum.Direction.html" title="enum petgraph::Direction">Direction</a>
|
|
|
) -> <a class="struct" href="struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'_, E, Ty, Ix> <a href="#" class="tooltip" data-notable-ty="Edges<'_, E, Ty, Ix>">ⓘ</a></h4></section></summary><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>, <code>Outgoing</code>: All edges connected to <code>a</code>, with <code>a</code> being the source of each
|
|
|
edge.</li>
|
|
|
<li><code>Undirected</code>, <code>Incoming</code>: All edges connected to <code>a</code>, with <code>a</code> being the target of each
|
|
|
edge.</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></details><details class="toggle method-toggle" open><summary><section id="method.externals" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#747-753">source</a><h4 class="code-header">pub fn <a href="#method.externals" class="fn">externals</a>(&self, dir: <a class="enum" href="../enum.Direction.html" title="enum petgraph::Direction">Direction</a>) -> <a class="struct" href="struct.Externals.html" title="struct petgraph::stable_graph::Externals">Externals</a><'_, N, Ty, Ix> <a href="#" class="tooltip" data-notable-ty="Externals<'_, N, Ty, Ix>">ⓘ</a></h4></section></summary><div class="docblock"><p>Return an iterator over either the nodes without edges to them
|
|
|
(<code>Incoming</code>) or from them (<code>Outgoing</code>).</p>
|
|
|
<p>An <em>internal</em> node has both incoming and outgoing edges.
|
|
|
The nodes in <code>.externals(Incoming)</code> are the source nodes and
|
|
|
<code>.externals(Outgoing)</code> are the sinks of the graph.</p>
|
|
|
<p>For a graph with undirected edges, both the sinks and the sources are
|
|
|
just the nodes without edges.</p>
|
|
|
<p>The whole iteration computes in <strong>O(|V|)</strong> time.</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.index_twice_mut" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#759-782">source</a><h4 class="code-header">pub fn <a href="#method.index_twice_mut" class="fn">index_twice_mut</a><T, U>(
|
|
|
&mut self,
|
|
|
i: T,
|
|
|
j: U
|
|
|
) -> (&mut <Self as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a>, &mut <Self as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#associatedtype.Output" title="type core::ops::index::Index::Output">Output</a>)<div class="where">where
|
|
|
Self: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><T> + <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><U>,
|
|
|
T: <a class="trait" href="../graph/trait.GraphIndex.html" title="trait petgraph::graph::GraphIndex">GraphIndex</a>,
|
|
|
U: <a class="trait" href="../graph/trait.GraphIndex.html" title="trait petgraph::graph::GraphIndex">GraphIndex</a>,</div></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.retain_nodes" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#799-810">source</a><h4 class="code-header">pub fn <a href="#method.retain_nodes" class="fn">retain_nodes</a><F>(&mut self, visit: F)<div class="where">where
|
|
|
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../graph/struct.Frozen.html" title="struct petgraph::graph::Frozen">Frozen</a><'_, Self>, <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.retain_edges" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#824-835">source</a><h4 class="code-header">pub fn <a href="#method.retain_edges" class="fn">retain_edges</a><F>(&mut self, visit: F)<div class="where">where
|
|
|
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../graph/struct.Frozen.html" title="struct petgraph::graph::Frozen">Frozen</a><'_, Self>, <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a>,</div></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.from_edges" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#854-864">source</a><h4 class="code-header">pub fn <a href="#method.from_edges" class="fn">from_edges</a><I>(iterable: I) -> Self<div class="where">where
|
|
|
I: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
|
|
|
I::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>: <a class="trait" href="../trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a><E>,
|
|
|
<I::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a> as <a class="trait" href="../trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a><E>>::<a class="associatedtype" href="../trait.IntoWeightedEdge.html#associatedtype.NodeId" title="type petgraph::IntoWeightedEdge::NodeId">NodeId</a>: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>>,
|
|
|
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,</div></h4></section></summary><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>
|
|
|
|
|
|
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>petgraph::stable_graph::StableGraph;
|
|
|
|
|
|
<span class="kw">let </span>gr = StableGraph::<(), i32>::from_edges(<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>),
|
|
|
]);</code></pre></div>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.map" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#871-891">source</a><h4 class="code-header">pub fn <a href="#method.map" class="fn">map</a><'a, F, G, N2, E2>(
|
|
|
&'a self,
|
|
|
node_map: F,
|
|
|
edge_map: G
|
|
|
) -> <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N2, E2, Ty, Ix><div class="where">where
|
|
|
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&'a N</a>) -> N2,
|
|
|
G: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&'a E</a>) -> E2,</div></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.filter_map" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#904-955">source</a><h4 class="code-header">pub fn <a href="#method.filter_map" class="fn">filter_map</a><'a, F, G, N2, E2>(
|
|
|
&'a self,
|
|
|
node_map: F,
|
|
|
edge_map: G
|
|
|
) -> <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N2, E2, Ty, Ix><div class="where">where
|
|
|
F: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&'a N</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><N2>,
|
|
|
G: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/function/trait.FnMut.html" title="trait core::ops::function::FnMut">FnMut</a>(<a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&'a E</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><E2>,</div></h4></section></summary><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></details><details class="toggle method-toggle" open><summary><section id="method.extend_with_edges" class="method"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#964-980">source</a><h4 class="code-header">pub fn <a href="#method.extend_with_edges" class="fn">extend_with_edges</a><I>(&mut self, iterable: I)<div class="where">where
|
|
|
I: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a>,
|
|
|
I::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a>: <a class="trait" href="../trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a><E>,
|
|
|
<I::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/collect/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::collect::IntoIterator::Item">Item</a> as <a class="trait" href="../trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a><E>>::<a class="associatedtype" href="../trait.IntoWeightedEdge.html#associatedtype.NodeId" title="type petgraph::IntoWeightedEdge::NodeId">NodeId</a>: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>>,
|
|
|
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a>,</div></h4></section></summary><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></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Build-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#162-186">source</a><a href="#impl-Build-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../data/trait.Build.html" title="trait petgraph::data::Build">Build</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="method.add_node-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#167-169">source</a><a href="#method.add_node-1" class="anchor">§</a><h4 class="code-header">fn <a href="../data/trait.Build.html#tymethod.add_node" class="fn">add_node</a>(&mut self, weight: Self::<a class="associatedtype" href="../visit/trait.Data.html#associatedtype.NodeWeight" title="type petgraph::visit::Data::NodeWeight">NodeWeight</a>) -> Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.add_edge-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#170-177">source</a><a href="#method.add_edge-1" class="anchor">§</a><h4 class="code-header">fn <a href="../data/trait.Build.html#method.add_edge" class="fn">add_edge</a>(
|
|
|
&mut self,
|
|
|
a: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>,
|
|
|
b: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>,
|
|
|
weight: Self::<a class="associatedtype" href="../visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a>
|
|
|
) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a>></h4></section></summary><div class='docblock'>Add a new edge. If parallel edges (duplicate) are not allowed and
|
|
|
the edge already exists, return <code>None</code>.</div></details><details class="toggle method-toggle" open><summary><section id="method.update_edge-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#178-185">source</a><a href="#method.update_edge-1" class="anchor">§</a><h4 class="code-header">fn <a href="../data/trait.Build.html#tymethod.update_edge" class="fn">update_edge</a>(
|
|
|
&mut self,
|
|
|
a: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>,
|
|
|
b: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>,
|
|
|
weight: Self::<a class="associatedtype" href="../visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a>
|
|
|
) -> Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a></h4></section></summary><div class='docblock'>Add or update the edge from <code>a</code> to <code>b</code>. Return the id of the affected
|
|
|
edge.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1134-1156">source</a><a href="#impl-Clone-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,
|
|
|
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="docblock"><p>The resulting cloned graph has the same graph indices as <code>self</code>.</p>
|
|
|
</div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1139-1147">source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&self) -> Self</h4></section></summary><div class='docblock'>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1149-1155">source</a><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&mut self, rhs: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&Self</a>)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Create-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#233-241">source</a><a href="#impl-Create-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../data/trait.Create.html" title="trait petgraph::data::Create">Create</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="method.with_capacity-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#238-240">source</a><a href="#method.with_capacity-1" class="anchor">§</a><h4 class="code-header">fn <a href="../data/trait.Create.html#tymethod.with_capacity" class="fn">with_capacity</a>(nodes: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>, edges: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>) -> Self</h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Data-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1801-1808">source</a><a href="#impl-Data-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../visit/trait.Data.html" title="trait petgraph::visit::Data">Data</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.NodeWeight" class="associatedtype trait-impl"><a href="#associatedtype.NodeWeight" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.Data.html#associatedtype.NodeWeight" class="associatedtype">NodeWeight</a> = N</h4></section><section id="associatedtype.EdgeWeight" class="associatedtype trait-impl"><a href="#associatedtype.EdgeWeight" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.Data.html#associatedtype.EdgeWeight" class="associatedtype">EdgeWeight</a> = E</h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DataMap-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#108-119">source</a><a href="#impl-DataMap-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../data/trait.DataMap.html" title="trait petgraph::data::DataMap">DataMap</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="method.node_weight-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#113-115">source</a><a href="#method.node_weight-1" class="anchor">§</a><h4 class="code-header">fn <a href="../data/trait.DataMap.html#tymethod.node_weight" class="fn">node_weight</a>(&self, id: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&Self::<a class="associatedtype" href="../visit/trait.Data.html#associatedtype.NodeWeight" title="type petgraph::visit::Data::NodeWeight">NodeWeight</a>></h4></section><section id="method.edge_weight-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#116-118">source</a><a href="#method.edge_weight-1" class="anchor">§</a><h4 class="code-header">fn <a href="../data/trait.DataMap.html#tymethod.edge_weight" class="fn">edge_weight</a>(&self, id: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&Self::<a class="associatedtype" href="../visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a>></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DataMapMut-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#122-133">source</a><a href="#impl-DataMapMut-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../data/trait.DataMapMut.html" title="trait petgraph::data::DataMapMut">DataMapMut</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="method.node_weight_mut-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#127-129">source</a><a href="#method.node_weight_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="../data/trait.DataMapMut.html#tymethod.node_weight_mut" class="fn">node_weight_mut</a>(&mut self, id: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut Self::<a class="associatedtype" href="../visit/trait.Data.html#associatedtype.NodeWeight" title="type petgraph::visit::Data::NodeWeight">NodeWeight</a>></h4></section><section id="method.edge_weight_mut-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#130-132">source</a><a href="#method.edge_weight_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="../data/trait.DataMapMut.html#tymethod.edge_weight_mut" class="fn">edge_weight_mut</a>(&mut self, id: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><&mut Self::<a class="associatedtype" href="../visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a>></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#106-166">source</a><a href="#impl-Debug-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,
|
|
|
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>,
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#113-165">source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&self, f: &mut <a class="struct" href="https://doc.rust-lang.org/1.76.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/1.76.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.76.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Default-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1213-1221">source</a><a href="#impl-Default-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="docblock"><p>Create a new empty <code>StableGraph</code>.</p>
|
|
|
</div><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.default" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1218-1220">source</a><a href="#method.default" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html#tymethod.default" class="fn">default</a>() -> Self</h4></section></summary><div class='docblock'>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.76.0/core/default/trait.Default.html#tymethod.default">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-EdgeCount-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1974-1983">source</a><a href="#impl-EdgeCount-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../visit/trait.EdgeCount.html" title="trait petgraph::visit::EdgeCount">EdgeCount</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.edge_count-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1980-1982">source</a><a href="#method.edge_count-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.EdgeCount.html#tymethod.edge_count" class="fn">edge_count</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Return the number of edges in the graph.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-EdgeIndexable-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1925-1943">source</a><a href="#impl-EdgeIndexable-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../visit/trait.EdgeIndexable.html" title="trait petgraph::visit::EdgeIndexable">EdgeIndexable</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.edge_bound" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1930-1934">source</a><a href="#method.edge_bound" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.EdgeIndexable.html#tymethod.edge_bound" class="fn">edge_bound</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Return an upper bound of the edge indices in the graph
|
|
|
(suitable for the size of a bitmap).</div></details><details class="toggle method-toggle" open><summary><section id="method.to_index-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1936-1938">source</a><a href="#method.to_index-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.EdgeIndexable.html#tymethod.to_index" class="fn">to_index</a>(&self, ix: <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Convert <code>a</code> to an integer index.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_index-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1940-1942">source</a><a href="#method.from_index-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.EdgeIndexable.html#tymethod.from_index" class="fn">from_index</a>(&self, ix: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>) -> Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a></h4></section></summary><div class='docblock'>Convert <code>i</code> to an edge index. <code>i</code> must be a valid value in the graph.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CGraph%3CN,+E,+Ty,+Ix%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1229-1256">source</a><a href="#impl-From%3CGraph%3CN,+E,+Ty,+Ix%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="../graph/struct.Graph.html" title="struct petgraph::graph::Graph">Graph</a><N, E, Ty, Ix>> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><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"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1234-1255">source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(g: <a class="struct" href="../graph/struct.Graph.html" title="struct petgraph::graph::Graph">Graph</a><N, E, Ty, Ix>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-From%3CStableGraph%3CN,+E,+Ty,+Ix%3E%3E-for-Graph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1268-1296">source</a><a href="#impl-From%3CStableGraph%3CN,+E,+Ty,+Ix%3E%3E-for-Graph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><<a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix>> for <a class="struct" href="../graph/struct.Graph.html" title="struct petgraph::graph::Graph">Graph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><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"><details class="toggle method-toggle" open><summary><section id="method.from-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1273-1295">source</a><a href="#method.from-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(graph: <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix>) -> Self</h4></section></summary><div class='docblock'>Converts to this type from the input type.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-FromElements-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#340-352">source</a><a href="#impl-FromElements-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../data/trait.FromElements.html" title="trait petgraph::data::FromElements">FromElements</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="method.from_elements" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/data.rs.html#345-351">source</a><a href="#method.from_elements" class="anchor">§</a><h4 class="code-header">fn <a href="../data/trait.FromElements.html#method.from_elements" class="fn">from_elements</a><I>(iterable: I) -> Self<div class="where">where
|
|
|
Self: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,
|
|
|
I: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="enum" href="../data/enum.Element.html" title="enum petgraph::data::Element">Element</a><Self::<a class="associatedtype" href="../visit/trait.Data.html#associatedtype.NodeWeight" title="type petgraph::visit::Data::NodeWeight">NodeWeight</a>, Self::<a class="associatedtype" href="../visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a>>>,</div></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-GetAdjacencyMatrix-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/traits_graph.rs.html#47-73">source</a><a href="#impl-GetAdjacencyMatrix-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../visit/trait.GetAdjacencyMatrix.html" title="trait petgraph::visit::GetAdjacencyMatrix">GetAdjacencyMatrix</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><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"><details class="toggle" open><summary><section id="associatedtype.AdjMatrix" class="associatedtype trait-impl"><a href="#associatedtype.AdjMatrix" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.GetAdjacencyMatrix.html#associatedtype.AdjMatrix" class="associatedtype">AdjMatrix</a> = <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></h4></section></summary><div class='docblock'>The associated adjacency matrix type</div></details><details class="toggle method-toggle" open><summary><section id="method.adjacency_matrix" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/traits_graph.rs.html#54-66">source</a><a href="#method.adjacency_matrix" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.GetAdjacencyMatrix.html#tymethod.adjacency_matrix" class="fn">adjacency_matrix</a>(&self) -> <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></h4></section></summary><div class='docblock'>Create the adjacency matrix</div></details><details class="toggle method-toggle" open><summary><section id="method.is_adjacent" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/traits_graph.rs.html#68-72">source</a><a href="#method.is_adjacent" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.GetAdjacencyMatrix.html#tymethod.is_adjacent" class="fn">is_adjacent</a>(
|
|
|
&self,
|
|
|
matrix: &<a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a>,
|
|
|
a: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
b: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>
|
|
|
) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>Return true if there is an edge from <code>a</code> to <code>b</code>, false otherwise. <a href="../visit/trait.GetAdjacencyMatrix.html#tymethod.is_adjacent">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-GraphBase-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1778-1784">source</a><a href="#impl-GraphBase-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../visit/trait.GraphBase.html" title="trait petgraph::visit::GraphBase">GraphBase</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.NodeId" class="associatedtype trait-impl"><a href="#associatedtype.NodeId" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.GraphBase.html#associatedtype.NodeId" class="associatedtype">NodeId</a> = <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix></h4></section></summary><div class='docblock'>node identifier</div></details><details class="toggle" open><summary><section id="associatedtype.EdgeId" class="associatedtype trait-impl"><a href="#associatedtype.EdgeId" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.GraphBase.html#associatedtype.EdgeId" class="associatedtype">EdgeId</a> = <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix></h4></section></summary><div class='docblock'>edge identifier</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-GraphProp-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1810-1816">source</a><a href="#impl-GraphProp-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../visit/trait.GraphProp.html" title="trait petgraph::visit::GraphProp">GraphProp</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.EdgeType" class="associatedtype trait-impl"><a href="#associatedtype.EdgeType" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.GraphProp.html#associatedtype.EdgeType" class="associatedtype">EdgeType</a> = Ty</h4></section></summary><div class='docblock'>The kind of edges in the graph.</div></details><section id="method.is_directed-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/visit/mod.rs.html#329-331">source</a><a href="#method.is_directed-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.GraphProp.html#method.is_directed" class="fn">is_directed</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.bool.html">bool</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3CEdgeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1188-1197">source</a><a href="#impl-Index%3CEdgeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><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"><details class="toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = E</h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1194-1196">source</a><a href="#method.index-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, index: <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&E</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Index%3CNodeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1161-1170">source</a><a href="#impl-Index%3CNodeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a><<a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><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"><details class="toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl"><a href="#associatedtype.Output" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#associatedtype.Output" class="associatedtype">Output</a> = N</h4></section></summary><div class='docblock'>The returned type after indexing.</div></details><details class="toggle method-toggle" open><summary><section id="method.index" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1167-1169">source</a><a href="#method.index" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#tymethod.index" class="fn">index</a>(&self, index: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&N</a></h4></section></summary><div class='docblock'>Performs the indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.Index.html#tymethod.index">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CEdgeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1202-1210">source</a><a href="#impl-IndexMut%3CEdgeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><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"><details class="toggle method-toggle" open><summary><section id="method.index_mut-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1207-1209">source</a><a href="#method.index_mut-1" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&mut self, index: <a class="struct" href="../graph/struct.EdgeIndex.html" title="struct petgraph::graph::EdgeIndex">EdgeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut E</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IndexMut%3CNodeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1175-1183">source</a><a href="#impl-IndexMut%3CNodeIndex%3CIx%3E%3E-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a><<a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><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"><details class="toggle method-toggle" open><summary><section id="method.index_mut" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1180-1182">source</a><a href="#method.index_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut" class="fn">index_mut</a>(&mut self, index: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut N</a></h4></section></summary><div class='docblock'>Performs the mutable indexing (<code>container[index]</code>) operation. <a href="https://doc.rust-lang.org/1.76.0/core/ops/index/trait.IndexMut.html#tymethod.index_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoEdgeReferences-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1956-1972">source</a><a href="#impl-IntoEdgeReferences-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<'a, N: 'a, E: 'a, Ty, Ix> <a class="trait" href="../visit/trait.IntoEdgeReferences.html" title="trait petgraph::visit::IntoEdgeReferences">IntoEdgeReferences</a> for &'a <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.edge_references" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1967-1971">source</a><a href="#method.edge_references" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoEdgeReferences.html#tymethod.edge_references" class="fn">edge_references</a>(self) -> Self::<a class="associatedtype" href="../visit/trait.IntoEdgeReferences.html#associatedtype.EdgeReferences" title="type petgraph::visit::IntoEdgeReferences::EdgeReferences">EdgeReferences</a></h4></section></summary><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></details><section id="associatedtype.EdgeRef" class="associatedtype trait-impl"><a href="#associatedtype.EdgeRef" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoEdgeReferences.html#associatedtype.EdgeRef" class="associatedtype">EdgeRef</a> = <a class="struct" href="struct.EdgeReference.html" title="struct petgraph::stable_graph::EdgeReference">EdgeReference</a><'a, E, Ix></h4></section><section id="associatedtype.EdgeReferences" class="associatedtype trait-impl"><a href="#associatedtype.EdgeReferences" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoEdgeReferences.html#associatedtype.EdgeReferences" class="associatedtype">EdgeReferences</a> = <a class="struct" href="struct.EdgeReferences.html" title="struct petgraph::stable_graph::EdgeReferences">EdgeReferences</a><'a, E, Ix></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoEdges-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1892-1901">source</a><a href="#impl-IntoEdges-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<'a, N, E, Ty, Ix> <a class="trait" href="../visit/trait.IntoEdges.html" title="trait petgraph::visit::IntoEdges">IntoEdges</a> for &'a <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Edges" class="associatedtype trait-impl"><a href="#associatedtype.Edges" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoEdges.html#associatedtype.Edges" class="associatedtype">Edges</a> = <a class="struct" href="struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'a, E, Ty, Ix></h4></section><section id="method.edges-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1898-1900">source</a><a href="#method.edges-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoEdges.html#tymethod.edges" class="fn">edges</a>(self, a: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -> Self::<a class="associatedtype" href="../visit/trait.IntoEdges.html#associatedtype.Edges" title="type petgraph::visit::IntoEdges::Edges">Edges</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoEdgesDirected-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1945-1954">source</a><a href="#impl-IntoEdgesDirected-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<'a, N, E, Ty, Ix> <a class="trait" href="../visit/trait.IntoEdgesDirected.html" title="trait petgraph::visit::IntoEdgesDirected">IntoEdgesDirected</a> for &'a <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.EdgesDirected" class="associatedtype trait-impl"><a href="#associatedtype.EdgesDirected" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoEdgesDirected.html#associatedtype.EdgesDirected" class="associatedtype">EdgesDirected</a> = <a class="struct" href="struct.Edges.html" title="struct petgraph::stable_graph::Edges">Edges</a><'a, E, Ty, Ix></h4></section><section id="method.edges_directed-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1951-1953">source</a><a href="#method.edges_directed-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoEdgesDirected.html#tymethod.edges_directed" class="fn">edges_directed</a>(self, a: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>, dir: <a class="enum" href="../enum.Direction.html" title="enum petgraph::Direction">Direction</a>) -> Self::<a class="associatedtype" href="../visit/trait.IntoEdgesDirected.html#associatedtype.EdgesDirected" title="type petgraph::visit::IntoEdgesDirected::EdgesDirected">EdgesDirected</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoNeighbors-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1870-1879">source</a><a href="#impl-IntoNeighbors-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<'a, N, E: 'a, Ty, Ix> <a class="trait" href="../visit/trait.IntoNeighbors.html" title="trait petgraph::visit::IntoNeighbors">IntoNeighbors</a> for &'a <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Neighbors" class="associatedtype trait-impl"><a href="#associatedtype.Neighbors" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoNeighbors.html#associatedtype.Neighbors" class="associatedtype">Neighbors</a> = <a class="struct" href="struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix></h4></section><details class="toggle method-toggle" open><summary><section id="method.neighbors-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1876-1878">source</a><a href="#method.neighbors-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoNeighbors.html#tymethod.neighbors" class="fn">neighbors</a>(self, n: Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -> Self::<a class="associatedtype" href="../visit/trait.IntoNeighbors.html#associatedtype.Neighbors" title="type petgraph::visit::IntoNeighbors::Neighbors">Neighbors</a></h4></section></summary><div class='docblock'>Return an iterator of the neighbors of node <code>a</code>.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoNeighborsDirected-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1881-1890">source</a><a href="#impl-IntoNeighborsDirected-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<'a, N, E: 'a, Ty, Ix> <a class="trait" href="../visit/trait.IntoNeighborsDirected.html" title="trait petgraph::visit::IntoNeighborsDirected">IntoNeighborsDirected</a> for &'a <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.NeighborsDirected" class="associatedtype trait-impl"><a href="#associatedtype.NeighborsDirected" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoNeighborsDirected.html#associatedtype.NeighborsDirected" class="associatedtype">NeighborsDirected</a> = <a class="struct" href="struct.Neighbors.html" title="struct petgraph::stable_graph::Neighbors">Neighbors</a><'a, E, Ix></h4></section><section id="method.neighbors_directed-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1887-1889">source</a><a href="#method.neighbors_directed-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoNeighborsDirected.html#tymethod.neighbors_directed" class="fn">neighbors_directed</a>(
|
|
|
self,
|
|
|
n: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>,
|
|
|
d: <a class="enum" href="../enum.Direction.html" title="enum petgraph::Direction">Direction</a>
|
|
|
) -> Self::<a class="associatedtype" href="../visit/trait.IntoNeighborsDirected.html#associatedtype.NeighborsDirected" title="type petgraph::visit::IntoNeighborsDirected::NeighborsDirected">NeighborsDirected</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoNodeIdentifiers-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1818-1827">source</a><a href="#impl-IntoNodeIdentifiers-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<'a, N, E: 'a, Ty, Ix> <a class="trait" href="../visit/trait.IntoNodeIdentifiers.html" title="trait petgraph::visit::IntoNodeIdentifiers">IntoNodeIdentifiers</a> for &'a <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.NodeIdentifiers" class="associatedtype trait-impl"><a href="#associatedtype.NodeIdentifiers" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoNodeIdentifiers.html#associatedtype.NodeIdentifiers" class="associatedtype">NodeIdentifiers</a> = <a class="struct" href="struct.NodeIndices.html" title="struct petgraph::stable_graph::NodeIndices">NodeIndices</a><'a, N, Ix></h4></section><section id="method.node_identifiers" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1824-1826">source</a><a href="#method.node_identifiers" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoNodeIdentifiers.html#tymethod.node_identifiers" class="fn">node_identifiers</a>(self) -> Self::<a class="associatedtype" href="../visit/trait.IntoNodeIdentifiers.html#associatedtype.NodeIdentifiers" title="type petgraph::visit::IntoNodeIdentifiers::NodeIdentifiers">NodeIdentifiers</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-IntoNodeReferences-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1839-1851">source</a><a href="#impl-IntoNodeReferences-for-%26StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<'a, N, E, Ty, Ix> <a class="trait" href="../visit/trait.IntoNodeReferences.html" title="trait petgraph::visit::IntoNodeReferences">IntoNodeReferences</a> for &'a <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.NodeRef" class="associatedtype trait-impl"><a href="#associatedtype.NodeRef" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoNodeReferences.html#associatedtype.NodeRef" class="associatedtype">NodeRef</a> = (<a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>, <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&'a N</a>)</h4></section><section id="associatedtype.NodeReferences" class="associatedtype trait-impl"><a href="#associatedtype.NodeReferences" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.IntoNodeReferences.html#associatedtype.NodeReferences" class="associatedtype">NodeReferences</a> = <a class="struct" href="struct.NodeReferences.html" title="struct petgraph::stable_graph::NodeReferences">NodeReferences</a><'a, N, Ix></h4></section><section id="method.node_references" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1846-1850">source</a><a href="#method.node_references" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.IntoNodeReferences.html#tymethod.node_references" class="fn">node_references</a>(self) -> Self::<a class="associatedtype" href="../visit/trait.IntoNodeReferences.html#associatedtype.NodeReferences" title="type petgraph::visit::IntoNodeReferences::NodeReferences">NodeReferences</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-NodeCount-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1829-1837">source</a><a href="#impl-NodeCount-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../visit/trait.NodeCount.html" title="trait petgraph::visit::NodeCount">NodeCount</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><section id="method.node_count-1" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1834-1836">source</a><a href="#method.node_count-1" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.NodeCount.html#tymethod.node_count" class="fn">node_count</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-NodeIndexable-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1853-1868">source</a><a href="#impl-NodeIndexable-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../visit/trait.NodeIndexable.html" title="trait petgraph::visit::NodeIndexable">NodeIndexable</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.node_bound" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1859-1861">source</a><a href="#method.node_bound" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.NodeIndexable.html#tymethod.node_bound" class="fn">node_bound</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Return an upper bound of the node indices in the graph</p>
|
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.to_index" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1862-1864">source</a><a href="#method.to_index" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.NodeIndexable.html#tymethod.to_index" class="fn">to_index</a>(&self, ix: <a class="struct" href="../graph/struct.NodeIndex.html" title="struct petgraph::graph::NodeIndex">NodeIndex</a><Ix>) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a></h4></section></summary><div class='docblock'>Convert <code>a</code> to an integer index.</div></details><details class="toggle method-toggle" open><summary><section id="method.from_index" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1865-1867">source</a><a href="#method.from_index" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.NodeIndexable.html#tymethod.from_index" class="fn">from_index</a>(&self, ix: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.usize.html">usize</a>) -> Self::<a class="associatedtype" href="../visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a></h4></section></summary><div class='docblock'>Convert <code>i</code> to a node index. <code>i</code> must be a valid value in the graph.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Visitable-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1786-1799">source</a><a href="#impl-Visitable-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="../visit/trait.Visitable.html" title="trait petgraph::visit::Visitable">Visitable</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
Ty: <a class="trait" href="../trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,
|
|
|
Ix: <a class="trait" href="../graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Map" class="associatedtype trait-impl"><a href="#associatedtype.Map" class="anchor">§</a><h4 class="code-header">type <a href="../visit/trait.Visitable.html#associatedtype.Map" class="associatedtype">Map</a> = <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></h4></section></summary><div class='docblock'>The associated map type</div></details><details class="toggle method-toggle" open><summary><section id="method.visit_map" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1792-1794">source</a><a href="#method.visit_map" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.Visitable.html#tymethod.visit_map" class="fn">visit_map</a>(&self) -> <a class="struct" href="../../fixedbitset/struct.FixedBitSet.html" title="struct fixedbitset::FixedBitSet">FixedBitSet</a></h4></section></summary><div class='docblock'>Create a new visitor map</div></details><details class="toggle method-toggle" open><summary><section id="method.reset_map" class="method trait-impl"><a class="src rightside" href="../../src/petgraph/graph_impl/stable_graph/mod.rs.html#1795-1798">source</a><a href="#method.reset_map" class="anchor">§</a><h4 class="code-header">fn <a href="../visit/trait.Visitable.html#tymethod.reset_map" class="fn">reset_map</a>(&self, map: &mut Self::<a class="associatedtype" href="../visit/trait.Visitable.html#associatedtype.Map" title="type petgraph::visit::Visitable::Map">Map</a>)</h4></section></summary><div class='docblock'>Reset the visitor map (and resize to new size of graph if needed)</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a href="#impl-RefUnwindSafe-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,
|
|
|
Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,
|
|
|
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,
|
|
|
Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a>,</div></h3></section><section id="impl-Send-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a href="#impl-Send-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
|
|
|
Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
|
|
|
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,
|
|
|
Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</div></h3></section><section id="impl-Sync-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a href="#impl-Sync-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
|
|
|
Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
|
|
|
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,
|
|
|
Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,</div></h3></section><section id="impl-Unpin-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a href="#impl-Unpin-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
|
|
Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
|
|
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,
|
|
|
Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a>,</div></h3></section><section id="impl-UnwindSafe-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="impl"><a href="#impl-UnwindSafe-for-StableGraph%3CN,+E,+Ty,+Ix%3E" class="anchor">§</a><h3 class="code-header">impl<N, E, Ty, Ix> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.StableGraph.html" title="struct petgraph::stable_graph::StableGraph">StableGraph</a><N, E, Ty, Ix><div class="where">where
|
|
|
E: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,
|
|
|
Ix: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,
|
|
|
N: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,
|
|
|
Ty: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a>,</div></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/any.rs.html#140">source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
|
|
|
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/any.rs.html#141">source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.76.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.76.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#208">source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
|
|
T: ?<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#210">source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#216">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
|
|
T: ?<a class="trait" href="https://doc.rust-lang.org/1.76.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/borrow.rs.html#217">source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.76.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#763">source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from-2" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#766">source</a><a href="#method.from-2" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
|
|
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#747-749">source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
|
|
U: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#756">source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
|
|
|
<p>That is, this conversion is whatever the implementation of
|
|
|
<code><a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
|
|
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/alloc/borrow.rs.html#83-85">source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
|
|
|
T: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/alloc/borrow.rs.html#88">source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&self) -> T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/alloc/borrow.rs.html#92">source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&self, target: <a class="primitive" href="https://doc.rust-lang.org/1.76.0/std/primitive.reference.html">&mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.76.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#803-805">source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
|
|
U: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#810">source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#788-790">source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
|
|
U: <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.76.0/src/core/convert/mod.rs.html#795">source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.76.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.76.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div><script type="text/json" id="notable-traits-data">{"EdgeIndices<'_, E, Ix>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.EdgeIndices.html\" title=\"struct petgraph::stable_graph::EdgeIndices\">EdgeIndices</a><'a, E, Ix></code></h3><pre><code><div class=\"where\">impl<'a, E, Ix: <a class=\"trait\" href=\"../graph/trait.IndexType.html\" title=\"trait petgraph::graph::IndexType\">IndexType</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.EdgeIndices.html\" title=\"struct petgraph::stable_graph::EdgeIndices\">EdgeIndices</a><'a, E, Ix></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"../graph/struct.EdgeIndex.html\" title=\"struct petgraph::graph::EdgeIndex\">EdgeIndex</a><Ix>;</div>","Edges<'_, E, Ty, Ix>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Edges.html\" title=\"struct petgraph::stable_graph::Edges\">Edges</a><'a, E, Ty, Ix></code></h3><pre><code><div class=\"where\">impl<'a, E, Ty, Ix> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Edges.html\" title=\"struct petgraph::stable_graph::Edges\">Edges</a><'a, E, Ty, Ix><div class=\"where\">where\n Ty: <a class=\"trait\" href=\"../trait.EdgeType.html\" title=\"trait petgraph::EdgeType\">EdgeType</a>,\n Ix: <a class=\"trait\" href=\"../graph/trait.IndexType.html\" title=\"trait petgraph::graph::IndexType\">IndexType</a>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"struct.EdgeReference.html\" title=\"struct petgraph::stable_graph::EdgeReference\">EdgeReference</a><'a, E, Ix>;</div>","EdgesConnecting<'_, E, Ty, Ix>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.EdgesConnecting.html\" title=\"struct petgraph::stable_graph::EdgesConnecting\">EdgesConnecting</a><'a, E, Ty, Ix></code></h3><pre><code><div class=\"where\">impl<'a, E, Ty, Ix> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.EdgesConnecting.html\" title=\"struct petgraph::stable_graph::EdgesConnecting\">EdgesConnecting</a><'a, E, Ty, Ix><div class=\"where\">where\n Ty: <a class=\"trait\" href=\"../trait.EdgeType.html\" title=\"trait petgraph::EdgeType\">EdgeType</a>,\n Ix: <a class=\"trait\" href=\"../graph/trait.IndexType.html\" title=\"trait petgraph::graph::IndexType\">IndexType</a>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"struct.EdgeReference.html\" title=\"struct petgraph::stable_graph::EdgeReference\">EdgeReference</a><'a, E, Ix>;</div>","Externals<'_, N, Ty, Ix>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Externals.html\" title=\"struct petgraph::stable_graph::Externals\">Externals</a><'a, N, Ty, Ix></code></h3><pre><code><div class=\"where\">impl<'a, N: 'a, Ty, Ix> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Externals.html\" title=\"struct petgraph::stable_graph::Externals\">Externals</a><'a, N, Ty, Ix><div class=\"where\">where\n Ty: <a class=\"trait\" href=\"../trait.EdgeType.html\" title=\"trait petgraph::EdgeType\">EdgeType</a>,\n Ix: <a class=\"trait\" href=\"../graph/trait.IndexType.html\" title=\"trait petgraph::graph::IndexType\">IndexType</a>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"../graph/struct.NodeIndex.html\" title=\"struct petgraph::graph::NodeIndex\">NodeIndex</a><Ix>;</div>","Neighbors<'_, E, Ix>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.Neighbors.html\" title=\"struct petgraph::stable_graph::Neighbors\">Neighbors</a><'a, E, Ix></code></h3><pre><code><div class=\"where\">impl<'a, E, Ix> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.Neighbors.html\" title=\"struct petgraph::stable_graph::Neighbors\">Neighbors</a><'a, E, Ix><div class=\"where\">where\n Ix: <a class=\"trait\" href=\"../graph/trait.IndexType.html\" title=\"trait petgraph::graph::IndexType\">IndexType</a>,</div></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"../graph/struct.NodeIndex.html\" title=\"struct petgraph::graph::NodeIndex\">NodeIndex</a><Ix>;</div>","NodeIndices<'_, N, Ix>":"<h3>Notable traits for <code><a class=\"struct\" href=\"struct.NodeIndices.html\" title=\"struct petgraph::stable_graph::NodeIndices\">NodeIndices</a><'a, N, Ix></code></h3><pre><code><div class=\"where\">impl<'a, N, Ix: <a class=\"trait\" href=\"../graph/trait.IndexType.html\" title=\"trait petgraph::graph::IndexType\">IndexType</a>> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\">Iterator</a> for <a class=\"struct\" href=\"struct.NodeIndices.html\" title=\"struct petgraph::stable_graph::NodeIndices\">NodeIndices</a><'a, N, Ix></div><div class=\"where\"> type <a href=\"https://doc.rust-lang.org/1.76.0/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\">Item</a> = <a class=\"struct\" href=\"../graph/struct.NodeIndex.html\" title=\"struct petgraph::graph::NodeIndex\">NodeIndex</a><Ix>;</div>"}</script></section></div></main></body></html> |