mentat/petgraph/graphmap/struct.GraphMap.html

382 lines
92 KiB
HTML
Raw Permalink Normal View History

2018-08-22 17:04:13 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `GraphMap` struct in crate `petgraph`.">
<meta name="keywords" content="rust, rustlang, rust-lang, GraphMap">
<title>petgraph::graphmap::GraphMap - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle">
<link rel="stylesheet" type="text/css" href="../../dark.css">
<link rel="stylesheet" type="text/css" href="../../main.css" id="themeStyle">
<script src="../../storage.js"></script>
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
<p class='location'>Struct GraphMap</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#methods">Methods</a><div class="sidebar-links"><a href="#method.new">new</a><a href="#method.with_capacity">with_capacity</a><a href="#method.capacity">capacity</a><a href="#method.is_directed">is_directed</a><a href="#method.from_edges">from_edges</a><a href="#method.node_count">node_count</a><a href="#method.edge_count">edge_count</a><a href="#method.clear">clear</a><a href="#method.add_node">add_node</a><a href="#method.remove_node">remove_node</a><a href="#method.contains_node">contains_node</a><a href="#method.add_edge">add_edge</a><a href="#method.remove_edge">remove_edge</a><a href="#method.contains_edge">contains_edge</a><a href="#method.nodes">nodes</a><a href="#method.neighbors">neighbors</a><a href="#method.neighbors_directed">neighbors_directed</a><a href="#method.edges">edges</a><a href="#method.edge_weight">edge_weight</a><a href="#method.edge_weight_mut">edge_weight_mut</a><a href="#method.all_edges">all_edges</a><a href="#method.all_edges_mut">all_edges_mut</a><a href="#method.into_graph">into_graph</a></div><a class="sidebar-title" href="#implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-IntoNeighbors">IntoNeighbors</a><a href="#impl-IntoNeighborsDirected">IntoNeighborsDirected</a><a href="#impl-Data">Data</a><a href="#impl-GraphProp">GraphProp</a><a href="#impl-GraphBase">GraphBase</a><a href="#impl-Visitable">Visitable</a><a href="#impl-GetAdjacencyMatrix">GetAdjacencyMatrix</a><a href="#impl-Build">Build</a><a href="#impl-Create">Create</a><a href="#impl-FromElements">FromElements</a><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-FromIterator%3CItem%3E">FromIterator&lt;Item&gt;</a><a href="#impl-Extend%3CItem%3E">Extend&lt;Item&gt;</a><a href="#impl-IntoEdgeReferences">IntoEdgeReferences</a><a href="#impl-IntoEdges">IntoEdges</a><a href="#impl-Index%3C(N%2C%20N)%3E">Index&lt;(N, N)&gt;</a><a href="#impl-IndexMut%3C(N%2C%20N)%3E">IndexMut&lt;(N, N)&gt;</a><a href="#impl-Default">Default</a><a href="#impl-IntoNodeIdentifiers">IntoNodeIdentifiers</a><a href="#impl-NodeCount">NodeCount</a><a href="#impl-IntoNodeReferences">IntoNodeReferences</a><a href="#impl-NodeIndexable">NodeIndexable</a><a href="#impl-NodeCompactIndexable">NodeCompactIndexable</a></div></div><p class='location'><a href='../index.html'>petgraph</a>::<wbr><a href='index.html'>graphmap</a></p><script>window.sidebarCurrent = {name: 'GraphMap', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div>
</nav>
<div class="theme-picker">
<button id="theme-picker" aria-label="Pick another theme!">
<img src="../../brush.svg" width="18" alt="Pick another theme!">
</button>
<div id="theme-choices"></div>
</div>
<script src="../../theme.js"></script>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>petgraph</a>::<wbr><a href='index.html'>graphmap</a>::<wbr><a class="struct" href=''>GraphMap</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../../src/petgraph/graphmap.rs.html#74-78' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct GraphMap&lt;N, E, Ty&gt; { /* fields omitted */ }</pre><div class='docblock'><p><code>GraphMap&lt;N, E, Ty&gt;</code> is a graph datastructure using an associative array
of its node weights <code>N</code>.</p>
<p>It uses an combined adjacency list and sparse adjacency matrix
representation, using <strong>O(|V| + |E|)</strong> space, and allows testing for edge
existance in constant time.</p>
<p><code>GraphMap</code> is parameterized over:</p>
<ul>
<li>Associated data <code>N</code> for nodes and <code>E</code> for edges, called <em>weights</em>.</li>
<li>The node weight <code>N</code> must implement <code>Copy</code> and will be used as node
identifier, duplicated into several places in the data structure.
It must be suitable as a hash table key (implementing <code>Eq + Hash</code>).
The node type must also implement <code>Ord</code> so that the implementation can
order the pair (<code>a</code>, <code>b</code>) for an edge connecting any two nodes <code>a</code> and <code>b</code>.</li>
<li><code>E</code> can be of arbitrary type.</li>
<li>Edge type <code>Ty</code> that determines whether the graph edges are directed or
undirected.</li>
</ul>
<p>You can use the type aliases <code>UnGraphMap</code> and <code>DiGraphMap</code> for convenience.</p>
<p><code>GraphMap</code> does not allow parallel edges, but self loops are allowed.</p>
<p>Depends on crate feature <code>graphmap</code> (default).</p>
</div>
<h2 id='methods' class='small-section-header'>
Methods<a href='#methods' class='anchor'></a>
</h2>
<h3 id='impl' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#112-431' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>pub fn <a href='#method.new' class='fnname'>new</a>() -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#117-119' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Create a new <code>GraphMap</code></p>
</div><h4 id='method.with_capacity' class="method"><span id='with_capacity.v' class='invisible'><code>pub fn <a href='#method.with_capacity' class='fnname'>with_capacity</a>(nodes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, edges: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#122-128' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Create a new <code>GraphMap</code> with estimated capacity.</p>
</div><h4 id='method.capacity' class="method"><span id='capacity.v' class='invisible'><code>pub fn <a href='#method.capacity' class='fnname'>capacity</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#131-133' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return the current node and edge capacity of the graph.</p>
</div><h4 id='method.is_directed' class="method"><span id='is_directed.v' class='invisible'><code>pub fn <a href='#method.is_directed' class='fnname'>is_directed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#146-148' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Whether the graph has directed edges.</p>
</div><h4 id='method.from_edges' class="method"><span id='from_edges.v' class='invisible'><code>pub fn <a href='#method.from_edges' class='fnname'>from_edges</a>&lt;I&gt;(iterable: I) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;I::<a class="type" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html#associatedtype.Item" title="type core::iter::traits::IntoIterator::Item">Item</a>: <a class="trait" href="../../petgraph/trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a>&lt;E, NodeId = N&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#169-174' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Create a new <code>GraphMap</code> from an iterable of edges.</p>
<p>Node values are taken directly from the list.
Edge weights <code>E</code> may either be specified in the list,
or they are filled with default values.</p>
<p>Nodes are inserted automatically to match the edges.</p>
<pre class="rust rust-example-rendered">
<span class="kw">use</span> <span class="ident">petgraph</span>::<span class="ident">graphmap</span>::<span class="ident">UnGraphMap</span>;
<span class="comment">// Create a new undirected GraphMap.</span>
<span class="comment">// Use a type hint to have `()` be the edge weight type.</span>
<span class="kw">let</span> <span class="ident">gr</span> <span class="op">=</span> <span class="ident">UnGraphMap</span>::<span class="op">&lt;</span>_, ()<span class="op">&gt;</span>::<span class="ident">from_edges</span>(<span class="kw-2">&amp;</span>[
(<span class="number">0</span>, <span class="number">1</span>), (<span class="number">0</span>, <span class="number">2</span>), (<span class="number">0</span>, <span class="number">3</span>),
(<span class="number">1</span>, <span class="number">2</span>), (<span class="number">1</span>, <span class="number">3</span>),
(<span class="number">2</span>, <span class="number">3</span>),
]);</pre>
</div><h4 id='method.node_count' class="method"><span id='node_count.v' class='invisible'><code>pub fn <a href='#method.node_count' class='fnname'>node_count</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#177-179' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return the number of nodes in the graph.</p>
</div><h4 id='method.edge_count' class="method"><span id='edge_count.v' class='invisible'><code>pub fn <a href='#method.edge_count' class='fnname'>edge_count</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#182-184' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return the number of edges in the graph.</p>
</div><h4 id='method.clear' class="method"><span id='clear.v' class='invisible'><code>pub fn <a href='#method.clear' class='fnname'>clear</a>(&amp;mut self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#187-190' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Remove all nodes and edges</p>
</div><h4 id='method.add_node' class="method"><span id='add_node.v' class='invisible'><code>pub fn <a href='#method.add_node' class='fnname'>add_node</a>(&amp;mut self, n: N) -&gt; N</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#193-196' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Add node <code>n</code> to the graph.</p>
</div><h4 id='method.remove_node' class="method"><span id='remove_node.v' class='invisible'><code>pub fn <a href='#method.remove_node' class='fnname'>remove_node</a>(&amp;mut self, n: N) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#199-211' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return <code>true</code> if node <code>n</code> was removed.</p>
</div><h4 id='method.contains_node' class="method"><span id='contains_node.v' class='invisible'><code>pub fn <a href='#method.contains_node' class='fnname'>contains_node</a>(&amp;self, n: N) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#214-216' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return <code>true</code> if the node is contained in the graph.</p>
</div><h4 id='method.add_edge' class="method"><span id='add_edge.v' class='invisible'><code>pub fn <a href='#method.add_edge' class='fnname'>add_edge</a>(&amp;mut self, a: N, b: N, weight: E) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;E&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#239-255' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Add an edge connecting <code>a</code> and <code>b</code> to the graph, with associated
data <code>weight</code>. For a directed graph, the edge is directed from <code>a</code>
to <code>b</code>.</p>
<p>Inserts nodes <code>a</code> and/or <code>b</code> if they aren't already part of the graph.</p>
<p>Return <code>None</code> if the edge did not previously exist, otherwise,
the associated data is updated and the old value is returned
as <code>Some(old_weight)</code>.</p>
<pre class="rust rust-example-rendered">
<span class="comment">// Create a GraphMap with directed edges, and add one edge to it</span>
<span class="kw">use</span> <span class="ident">petgraph</span>::<span class="ident">graphmap</span>::<span class="ident">DiGraphMap</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">g</span> <span class="op">=</span> <span class="ident">DiGraphMap</span>::<span class="ident">new</span>();
<span class="ident">g</span>.<span class="ident">add_edge</span>(<span class="string">&quot;x&quot;</span>, <span class="string">&quot;y&quot;</span>, <span class="op">-</span><span class="number">1</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">g</span>.<span class="ident">node_count</span>(), <span class="number">2</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">g</span>.<span class="ident">edge_count</span>(), <span class="number">1</span>);
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">g</span>.<span class="ident">contains_edge</span>(<span class="string">&quot;x&quot;</span>, <span class="string">&quot;y&quot;</span>));
<span class="macro">assert</span><span class="macro">!</span>(<span class="op">!</span><span class="ident">g</span>.<span class="ident">contains_edge</span>(<span class="string">&quot;y&quot;</span>, <span class="string">&quot;x&quot;</span>));</pre>
</div><h4 id='method.remove_edge' class="method"><span id='remove_edge.v' class='invisible'><code>pub fn <a href='#method.remove_edge' class='fnname'>remove_edge</a>(&amp;mut self, a: N, b: N) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;E&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#294-302' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Remove edge from <code>a</code> to <code>b</code> from the graph and return the edge weight.</p>
<p>Return <code>None</code> if the edge didn't exist.</p>
<pre class="rust rust-example-rendered">
<span class="comment">// Create a GraphMap with undirected edges, and add and remove an edge.</span>
<span class="kw">use</span> <span class="ident">petgraph</span>::<span class="ident">graphmap</span>::<span class="ident">UnGraphMap</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">g</span> <span class="op">=</span> <span class="ident">UnGraphMap</span>::<span class="ident">new</span>();
<span class="ident">g</span>.<span class="ident">add_edge</span>(<span class="string">&quot;x&quot;</span>, <span class="string">&quot;y&quot;</span>, <span class="op">-</span><span class="number">1</span>);
<span class="kw">let</span> <span class="ident">edge_data</span> <span class="op">=</span> <span class="ident">g</span>.<span class="ident">remove_edge</span>(<span class="string">&quot;y&quot;</span>, <span class="string">&quot;x&quot;</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">edge_data</span>, <span class="prelude-val">Some</span>(<span class="op">-</span><span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">g</span>.<span class="ident">edge_count</span>(), <span class="number">0</span>);</pre>
</div><h4 id='method.contains_edge' class="method"><span id='contains_edge.v' class='invisible'><code>pub fn <a href='#method.contains_edge' class='fnname'>contains_edge</a>(&amp;self, a: N, b: N) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#305-307' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return <code>true</code> if the edge connecting <code>a</code> with <code>b</code> is contained in the graph.</p>
</div><h4 id='method.nodes' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/graphmap/struct.Nodes.html" title="struct petgraph::graphmap::Nodes">Nodes</a>&lt;'a, N&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/graphmap/struct.Nodes.html" title="struct petgraph::graphmap::Nodes">Nodes</a>&lt;'a, N&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, N&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/graphmap/struct.Nodes.html" title="struct petgraph::graphmap::Nodes">Nodes</a>&lt;'a, N&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: 'a + <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = N;</span></code></div></div><span id='nodes.v' class='invisible'><code>pub fn <a href='#method.nodes' class='fnname'>nodes</a>(&amp;self) -&gt; <a class="struct" href="../../petgraph/graphmap/struct.Nodes.html" title="struct petgraph::graphmap::Nodes">Nodes</a>&lt;N&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#312-314' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an iterator over the nodes of the graph.</p>
<p>Iterator element type is <code>N</code>.</p>
</div><h4 id='method.neighbors' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/graphmap/struct.Neighbors.html" title="struct petgraph::graphmap::Neighbors">Neighbors</a>&lt;'a, N, Ty&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/graphmap/struct.Neighbors.html" title="struct petgraph::graphmap::Neighbors">Neighbors</a>&lt;'a, N, Ty&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, N, Ty&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/graphmap/struct.Neighbors.html" title="struct petgraph::graphmap::Neighbors">Neighbors</a>&lt;'a, N, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = N;</span></code></div></div><span id='neighbors.v' class='invisible'><code>pub fn <a href='#method.neighbors' class='fnname'>neighbors</a>(&amp;self, a: N) -&gt; <a class="struct" href="../../petgraph/graphmap/struct.Neighbors.html" title="struct petgraph::graphmap::Neighbors">Neighbors</a>&lt;N, Ty&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#323-331' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an iterator of all nodes with an edge starting from <code>a</code>.</p>
<ul>
<li><code>Directed</code>: Outgoing edges from <code>a</code>.</li>
<li><code>Undirected</code>: All edges from or to <code>a</code>.</li>
</ul>
<p>Produces an empty iterator if the node doesn't exist.<br>
Iterator element type is <code>N</code>.</p>
</div><h4 id='method.neighbors_directed' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/graphmap/struct.NeighborsDirected.html" title="struct petgraph::graphmap::NeighborsDirected">NeighborsDirected</a>&lt;'a, N, Ty&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/graphmap/struct.NeighborsDirected.html" title="struct petgraph::graphmap::NeighborsDirected">NeighborsDirected</a>&lt;'a, N, Ty&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, N, Ty&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/graphmap/struct.NeighborsDirected.html" title="struct petgraph::graphmap::NeighborsDirected">NeighborsDirected</a>&lt;'a, N, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = N;</span></code></div></div><span id='neighbors_directed.v' class='invisible'><code>pub fn <a href='#method.neighbors_directed' class='fnname'>neighbors_directed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;a: N, <br>&nbsp;&nbsp;&nbsp;&nbsp;dir: <a class="enum" href="../../petgraph/enum.Direction.html" title="enum petgraph::Direction">Direction</a><br>) -&gt; <a class="struct" href="../../petgraph/graphmap/struct.NeighborsDirected.html" title="struct petgraph::graphmap::NeighborsDirected">NeighborsDirected</a>&lt;N, Ty&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#343-354' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an iterator of all neighbors that have an edge between them and
<code>a</code>, in the specified direction.
If the graph's edges are undirected, this is equivalent to <em>.neighbors(a)</em>.</p>
<ul>
<li><code>Directed</code>, <code>Outgoing</code>: All edges from <code>a</code>.</li>
<li><code>Directed</code>, <code>Incoming</code>: All edges to <code>a</code>.</li>
<li><code>Undirected</code>: All edges from or to <code>a</code>.</li>
</ul>
<p>Produces an empty iterator if the node doesn't exist.<br>
Iterator element type is <code>N</code>.</p>
</div><h4 id='method.edges' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/graphmap/struct.Edges.html" title="struct petgraph::graphmap::Edges">Edges</a>&lt;'a, N, E, Ty&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/graphmap/struct.Edges.html" title="struct petgraph::graphmap::Edges">Edges</a>&lt;'a, N, E, Ty&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, N, E, Ty&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/graphmap/struct.Edges.html" title="struct petgraph::graphmap::Edges">Edges</a>&lt;'a, N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: 'a + <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: 'a,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>N, N, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>E<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></div></div><span id='edges.v' class='invisible'><code>pub fn <a href='#method.edges' class='fnname'>edges</a>(&amp;self, from: N) -&gt; <a class="struct" href="../../petgraph/graphmap/struct.Edges.html" title="struct petgraph::graphmap::Edges">Edges</a>&lt;N, E, Ty&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#364-370' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an iterator of target nodes with an edge starting from <code>a</code>,
paired with their respective edge weights.</p>
<ul>
<li><code>Directed</code>: Outgoing edges from <code>a</code>.</li>
<li><code>Undirected</code>: All edges from or to <code>a</code>.</li>
</ul>
<p>Produces an empty iterator if the node doesn't exist.<br>
Iterator element type is <code>(N, &amp;E)</code>.</p>
</div><h4 id='method.edge_weight' class="method"><span id='edge_weight.v' class='invisible'><code>pub fn <a href='#method.edge_weight' class='fnname'>edge_weight</a>(&amp;self, a: N, b: N) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>E&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#374-376' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return a reference to the edge weight connecting <code>a</code> with <code>b</code>, or
<code>None</code> if the edge does not exist in the graph.</p>
</div><h4 id='method.edge_weight_mut' class="method"><span id='edge_weight_mut.v' class='invisible'><code>pub fn <a href='#method.edge_weight_mut' class='fnname'>edge_weight_mut</a>(&amp;mut self, a: N, b: N) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>E&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#380-382' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return a mutable reference to the edge weight connecting <code>a</code> with <code>b</code>, or
<code>None</code> if the edge does not exist in the graph.</p>
</div><h4 id='method.all_edges' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/graphmap/struct.AllEdges.html" title="struct petgraph::graphmap::AllEdges">AllEdges</a>&lt;'a, N, E, Ty&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/graphmap/struct.AllEdges.html" title="struct petgraph::graphmap::AllEdges">AllEdges</a>&lt;'a, N, E, Ty&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, N, E, Ty&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/graphmap/struct.AllEdges.html" title="struct petgraph::graphmap::AllEdges">AllEdges</a>&lt;'a, N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: 'a + <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: 'a,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>N, N, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>E<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></div></div><span id='all_edges.v' class='invisible'><code>pub fn <a href='#method.all_edges' class='fnname'>all_edges</a>(&amp;self) -&gt; <a class="struct" href="../../petgraph/graphmap/struct.AllEdges.html" title="struct petgraph::graphmap::AllEdges">AllEdges</a>&lt;N, E, Ty&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#387-392' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an iterator over all edges of the graph with their weight in arbitrary order.</p>
<p>Iterator element type is <code>(N, N, &amp;E)</code></p>
</div><h4 id='method.all_edges_mut' class="method"><div class="important-traits"><div class='tooltip'><span class='tooltiptext'>Important traits for <a class="struct" href="../../petgraph/graphmap/struct.AllEdgesMut.html" title="struct petgraph::graphmap::AllEdgesMut">AllEdgesMut</a>&lt;'a, N, E, Ty&gt;</span></div><div class="content hidden"><h3 class="important">Important traits for <a class="struct" href="../../petgraph/graphmap/struct.AllEdgesMut.html" title="struct petgraph::graphmap::AllEdgesMut">AllEdgesMut</a>&lt;'a, N, E, Ty&gt;</h3><code class="content"><span class="where fmt-newline">impl&lt;'a, N, E, Ty&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html" title="trait core::iter::iterator::Iterator">Iterator</a> for <a class="struct" href="../../petgraph/graphmap/struct.AllEdgesMut.html" title="struct petgraph::graphmap::AllEdgesMut">AllEdgesMut</a>&lt;'a, N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: 'a + <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;E: 'a,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></span><span class="where fmt-newline"> type <a href='https://doc.rust-lang.org/nightly/core/iter/iterator/trait.Iterator.html#associatedtype.Item' class="type">Item</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>N, N, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>E<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;</span></code></div></div><span id='all_edges_mut.v' class='invisible'><code>pub fn <a href='#method.all_edges_mut' class='fnname'>all_edges_mut</a>(&amp;mut self) -&gt; <a class="struct" href="../../petgraph/graphmap/struct.AllEdgesMut.html" title="struct petgraph::graphmap::AllEdgesMut">AllEdgesMut</a>&lt;N, E, Ty&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#398-403' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an iterator over all edges of the graph in arbitrary order, with a mutable reference
to their weight.</p>
<p>Iterator element type is <code>(N, N, &amp;mut E)</code></p>
</div><h4 id='method.into_graph' class="method"><span id='into_graph.v' class='invisible'><code>pub fn <a href='#method.into_graph' class='fnname'>into_graph</a>&lt;Ix&gt;(self) -&gt; <a class="struct" href="../../petgraph/graph/struct.Graph.html" title="struct petgraph::graph::Graph">Graph</a>&lt;N, E, Ty, Ix&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Ix: <a class="trait" href="../../petgraph/graph/trait.IndexType.html" title="trait petgraph::graph::IndexType">IndexType</a>,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#416-430' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return a <code>Graph</code> that corresponds to this <code>GraphMap</code>.</p>
<ol>
<li>Note that node and edge indices in the <code>Graph</code> have nothing in common
with the <code>GraphMap</code>s node weights <code>N</code>. The node weights <code>N</code> are used as
node weights in the resulting <code>Graph</code>, too.</li>
<li>Note that the index type is user-chosen.</li>
</ol>
<p>Computes in <strong>O(|V| + |E|)</strong> time (average).</p>
<p><strong>Panics</strong> if the number of nodes or edges does not fit with
the resulting graph's index type.</p>
</div></div>
<h2 id='implementations' class='small-section-header'>
Trait Implementations<a href='#implementations' class='anchor'></a>
</h2>
<h3 id='impl-IntoNeighbors' class='impl'><span class='in-band'><code>impl&lt;'a, N:&nbsp;'a, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.IntoNeighbors.html" title="trait petgraph::visit::IntoNeighbors">IntoNeighbors</a> for &amp;'a <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-IntoNeighbors' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#123-131' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Neighbors' class="type"><span id='Neighbors.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoNeighbors.html#associatedtype.Neighbors' class="type">Neighbors</a> = <a class="struct" href="../../petgraph/graphmap/struct.Neighbors.html" title="struct petgraph::graphmap::Neighbors">Neighbors</a>&lt;'a, N, Ty&gt;</code></span></h4>
<h4 id='method.neighbors-1' class="method"><span id='neighbors.v-1' class='invisible'><code>fn <a href='../../petgraph/visit/trait.IntoNeighbors.html#tymethod.neighbors' class='fnname'>neighbors</a>(self, n: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -&gt; Self::<a class="type" href="../../petgraph/visit/trait.IntoNeighbors.html#associatedtype.Neighbors" title="type petgraph::visit::IntoNeighbors::Neighbors">Neighbors</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#128-130' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an iterator of the neighbors of node <code>a</code>.</p>
</div></div><h3 id='impl-IntoNeighborsDirected' class='impl'><span class='in-band'><code>impl&lt;'a, N:&nbsp;'a, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.IntoNeighborsDirected.html" title="trait petgraph::visit::IntoNeighborsDirected">IntoNeighborsDirected</a> for &amp;'a <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-IntoNeighborsDirected' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#208-218' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.NeighborsDirected' class="type"><span id='NeighborsDirected.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoNeighborsDirected.html#associatedtype.NeighborsDirected' class="type">NeighborsDirected</a> = <a class="struct" href="../../petgraph/graphmap/struct.NeighborsDirected.html" title="struct petgraph::graphmap::NeighborsDirected">NeighborsDirected</a>&lt;'a, N, Ty&gt;</code></span></h4>
<h4 id='method.neighbors_directed-1' class="method"><span id='neighbors_directed.v-1' class='invisible'><code>fn <a href='../../petgraph/visit/trait.IntoNeighborsDirected.html#tymethod.neighbors_directed' class='fnname'>neighbors_directed</a>(self, n: N, dir: <a class="enum" href="../../petgraph/enum.Direction.html" title="enum petgraph::Direction">Direction</a>) -&gt; Self::<a class="type" href="../../petgraph/visit/trait.IntoNeighborsDirected.html#associatedtype.NeighborsDirected" title="type petgraph::visit::IntoNeighborsDirected::NeighborsDirected">NeighborsDirected</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#213-217' title='goto source code'>[src]</a></span></h4>
</div><h3 id='impl-Data' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.Data.html" title="trait petgraph::visit::Data">Data</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-Data' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#422-428' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.NodeWeight' class="type"><span id='NodeWeight.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.Data.html#associatedtype.NodeWeight' class="type">NodeWeight</a> = N</code></span></h4>
<h4 id='associatedtype.EdgeWeight' class="type"><span id='EdgeWeight.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.Data.html#associatedtype.EdgeWeight' class="type">EdgeWeight</a> = E</code></span></h4>
</div><h3 id='impl-GraphProp' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.GraphProp.html" title="trait petgraph::visit::GraphProp">GraphProp</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-GraphProp' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#462-467' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.EdgeType' class="type"><span id='EdgeType.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.GraphProp.html#associatedtype.EdgeType' class="type">EdgeType</a> = Ty</code></span></h4>
<div class='docblock'><p>The kind edges in the graph.</p>
</div><h4 id='method.is_directed-1' class="method"><span id='is_directed.v-1' class='invisible'><code>fn <a href='../../petgraph/visit/trait.GraphProp.html#method.is_directed' class='fnname'>is_directed</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#438-440' title='goto source code'>[src]</a></span></h4>
</div><h3 id='impl-GraphBase' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.GraphBase.html" title="trait petgraph::visit::GraphBase">GraphBase</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>,&nbsp;</span></code><a href='#impl-GraphBase' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#657-662' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.NodeId' class="type"><span id='NodeId.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId' class="type">NodeId</a> = N</code></span></h4>
<div class='docblock'><p>node identifier</p>
</div><h4 id='associatedtype.EdgeId' class="type"><span id='EdgeId.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.GraphBase.html#associatedtype.EdgeId' class="type">EdgeId</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>N, N<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></span></h4>
<div class='docblock'><p>edge identifier</p>
</div></div><h3 id='impl-Visitable' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.Visitable.html" title="trait petgraph::visit::Visitable">Visitable</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-Visitable' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#665-674' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Map' class="type"><span id='Map.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.Visitable.html#associatedtype.Map' class="type">Map</a> = <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;N&gt;</code></span></h4>
<div class='docblock'><p>The associated map type</p>
</div><h4 id='method.visit_map' class="method"><span id='visit_map.v' class='invisible'><code>fn <a href='../../petgraph/visit/trait.Visitable.html#tymethod.visit_map' class='fnname'>visit_map</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/std/collections/hash/set/struct.HashSet.html" title="struct std::collections::hash::set::HashSet">HashSet</a>&lt;N&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#670' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Create a new visitor map</p>
</div><h4 id='method.reset_map' class="method"><span id='reset_map.v' class='invisible'><code>fn <a href='../../petgraph/visit/trait.Visitable.html#tymethod.reset_map' class='fnname'>reset_map</a>(&amp;self, map: &amp;mut Self::<a class="type" href="../../petgraph/visit/trait.Visitable.html#associatedtype.Map" title="type petgraph::visit::Visitable::Map">Map</a>)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#671-673' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Reset the visitor map (and resize to new size of graph if needed)</p>
</div></div><h3 id='impl-GetAdjacencyMatrix' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.GetAdjacencyMatrix.html" title="trait petgraph::visit::GetAdjacencyMatrix">GetAdjacencyMatrix</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-GetAdjacencyMatrix' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#700-711' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>The <code>GraphMap</code> keeps an adjacency matrix internally.</p>
</div><div class='impl-items'><h4 id='associatedtype.AdjMatrix' class="type"><span id='AdjMatrix.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.GetAdjacencyMatrix.html#associatedtype.AdjMatrix' class="type">AdjMatrix</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a></code></span></h4>
<div class='docblock'><p>The associated adjacency matrix type</p>
</div><h4 id='method.adjacency_matrix' class="method"><span id='adjacency_matrix.v' class='invisible'><code>fn <a href='../../petgraph/visit/trait.GetAdjacencyMatrix.html#tymethod.adjacency_matrix' class='fnname'>adjacency_matrix</a>(&amp;self)</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#706' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Create the adjacency matrix</p>
</div><h4 id='method.is_adjacent' class="method"><span id='is_adjacent.v' class='invisible'><code>fn <a href='../../petgraph/visit/trait.GetAdjacencyMatrix.html#tymethod.is_adjacent' class='fnname'>is_adjacent</a>(&amp;self, _: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, a: N, b: N) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/visit/mod.rs.html#708-710' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return true if there is an edge from <code>a</code> to <code>b</code>, false otherwise. <a href="../../petgraph/visit/trait.GetAdjacencyMatrix.html#tymethod.is_adjacent">Read more</a></p>
</div></div><h3 id='impl-Build' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/data/trait.Build.html" title="trait petgraph::data::Build">Build</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,&nbsp;</span></code><a href='#impl-Build' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#178-206' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.add_node-1' class="method"><span id='add_node.v-1' class='invisible'><code>fn <a href='../../petgraph/data/trait.Build.html#tymethod.add_node' class='fnname'>add_node</a>(&amp;mut self, weight: Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.NodeWeight" title="type petgraph::visit::Data::NodeWeight">NodeWeight</a>) -&gt; Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#182-184' title='goto source code'>[src]</a></span></h4>
<h4 id='method.add_edge-1' class="method"><span id='add_edge.v-1' class='invisible'><code>fn <a href='../../petgraph/data/trait.Build.html#method.add_edge' class='fnname'>add_edge</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;a: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;weight: Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a>&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#185-197' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Add a new edge. If parallel edges (duplicate) are not allowed and the edge already exists, return <code>None</code>. <a href="../../petgraph/data/trait.Build.html#method.add_edge">Read more</a></p>
</div><h4 id='method.update_edge' class="method"><span id='update_edge.v' class='invisible'><code>fn <a href='../../petgraph/data/trait.Build.html#tymethod.update_edge' class='fnname'>update_edge</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;a: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;b: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;weight: Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a><br>) -&gt; Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.EdgeId" title="type petgraph::visit::GraphBase::EdgeId">EdgeId</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#198-205' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Add or update the edge from <code>a</code> to <code>b</code>. Return the id of the affected edge. <a href="../../petgraph/data/trait.Build.html#tymethod.update_edge">Read more</a></p>
</div></div><h3 id='impl-Create' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/data/trait.Create.html" title="trait petgraph::data::Create">Create</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,&nbsp;</span></code><a href='#impl-Create' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#229-236' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.with_capacity-1' class="method"><span id='with_capacity.v-1' class='invisible'><code>fn <a href='../../petgraph/data/trait.Create.html#tymethod.with_capacity' class='fnname'>with_capacity</a>(nodes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>, edges: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#233-235' title='goto source code'>[src]</a></span></h4>
</div><h3 id='impl-FromElements' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/data/trait.FromElements.html" title="trait petgraph::data::FromElements">FromElements</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,&nbsp;</span></code><a href='#impl-FromElements' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#328-338' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.from_elements' class="method"><span id='from_elements.v' class='invisible'><code>fn <a href='../../petgraph/data/trait.FromElements.html#method.from_elements' class='fnname'>from_elements</a>&lt;I&gt;(iterable: I) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>&lt;Item = <a class="enum" href="../../petgraph/data/enum.Element.html" title="enum petgraph::data::Element">Element</a>&lt;Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.NodeWeight" title="type petgraph::visit::Data::NodeWeight">NodeWeight</a>, Self::<a class="type" href="../../petgraph/visit/trait.Data.html#associatedtype.EdgeWeight" title="type petgraph::visit::Data::EdgeWeight">EdgeWeight</a>&gt;&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/data.rs.html#332-337' title='goto source code'>[src]</a></span></h4>
</div><h3 id='impl-Clone' class='impl'><span class='in-band'><code>impl&lt;N:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>, Ty:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt;</code><a href='#impl-Clone' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#73' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class="method"><span id='clone.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt;</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#73' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method"><span id='clone_from.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code></span><span class='out-of-band'><div class='ghost'></div><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#112-114' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id='impl-Debug' class='impl'><span class='in-band'><code>impl&lt;N:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/hash/trait.Hash.html" title="trait core::hash::Hash">Hash</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, E:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a>, Ty:&nbsp;<a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt;</code><a href='#impl-Debug' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#80-84' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#81-83' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id='impl-FromIterator%3CItem%3E' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty, Item&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html" title="trait core::iter::traits::FromIterator">FromIterator</a>&lt;Item&gt; for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Item: <a class="trait" href="../../petgraph/trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a>&lt;E, NodeId = N&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-FromIterator%3CItem%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#434-448' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Create a new <code>GraphMap</code> from an iterable of edges.</p>
</div><div class='impl-items'><h4 id='method.from_iter' class="method"><span id='from_iter.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter' class='fnname'>from_iter</a>&lt;I&gt;(iterable: I) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>&lt;Item = Item&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#439-447' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Creates a value from an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.FromIterator.html#tymethod.from_iter">Read more</a></p>
</div></div><h3 id='impl-Extend%3CItem%3E' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty, Item&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html" title="trait core::iter::traits::Extend">Extend</a>&lt;Item&gt; for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Item: <a class="trait" href="../../petgraph/trait.IntoWeightedEdge.html" title="trait petgraph::IntoWeightedEdge">IntoWeightedEdge</a>&lt;E, NodeId = N&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-Extend%3CItem%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#453-470' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Extend the graph from an iterable of edges.</p>
<p>Nodes are inserted automatically to match the edges.</p>
</div><div class='impl-items'><h4 id='method.extend' class="method"><span id='extend.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend' class='fnname'>extend</a>&lt;I&gt;(&amp;mut self, iterable: I) <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;I: <a class="trait" href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.IntoIterator.html" title="trait core::iter::traits::IntoIterator">IntoIterator</a>&lt;Item = Item&gt;,&nbsp;</span></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#458-469' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Extends a collection with the contents of an iterator. <a href="https://doc.rust-lang.org/nightly/core/iter/traits/trait.Extend.html#tymethod.extend">Read more</a></p>
</div></div><h3 id='impl-IntoEdgeReferences' class='impl'><span class='in-band'><code>impl&lt;'a, N:&nbsp;'a, E:&nbsp;'a, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.IntoEdgeReferences.html" title="trait petgraph::visit::IntoEdgeReferences">IntoEdgeReferences</a> for &amp;'a <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-IntoEdgeReferences' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#587-596' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.EdgeRef' class="type"><span id='EdgeRef.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoEdgeReferences.html#associatedtype.EdgeRef' class="type">EdgeRef</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>N, N, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>E<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></span></h4>
<h4 id='associatedtype.EdgeReferences' class="type"><span id='EdgeReferences.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoEdgeReferences.html#associatedtype.EdgeReferences' class="type">EdgeReferences</a> = <a class="struct" href="../../petgraph/graphmap/struct.AllEdges.html" title="struct petgraph::graphmap::AllEdges">AllEdges</a>&lt;'a, N, E, Ty&gt;</code></span></h4>
<h4 id='method.edge_references' class="method"><span id='edge_references.v' class='invisible'><code>fn <a href='../../petgraph/visit/trait.IntoEdgeReferences.html#tymethod.edge_references' class='fnname'>edge_references</a>(self) -&gt; Self::<a class="type" href="../../petgraph/visit/trait.IntoEdgeReferences.html#associatedtype.EdgeReferences" title="type petgraph::visit::IntoEdgeReferences::EdgeReferences">EdgeReferences</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#593-595' title='goto source code'>[src]</a></span></h4>
</div><h3 id='impl-IntoEdges' class='impl'><span class='in-band'><code>impl&lt;'a, N:&nbsp;'a, E:&nbsp;'a, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.IntoEdges.html" title="trait petgraph::visit::IntoEdges">IntoEdges</a> for &amp;'a <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-IntoEdges' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#682-690' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.Edges' class="type"><span id='Edges.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoEdges.html#associatedtype.Edges' class="type">Edges</a> = <a class="struct" href="../../petgraph/graphmap/struct.Edges.html" title="struct petgraph::graphmap::Edges">Edges</a>&lt;'a, N, E, Ty&gt;</code></span></h4>
<h4 id='method.edges-1' class="method"><span id='edges.v-1' class='invisible'><code>fn <a href='../../petgraph/visit/trait.IntoEdges.html#tymethod.edges' class='fnname'>edges</a>(self, a: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -&gt; Self::<a class="type" href="../../petgraph/visit/trait.IntoEdges.html#associatedtype.Edges" title="type petgraph::visit::IntoEdges::Edges">Edges</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#687-689' title='goto source code'>[src]</a></span></h4>
</div><h3 id='impl-Index%3C(N%2C%20N)%3E' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html" title="trait core::ops::index::Index">Index</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>N, N<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt; for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-Index%3C(N%2C%20N)%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#694-704' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Index <code>GraphMap</code> by node pairs to access edge weights.</p>
</div><div class='impl-items'><h4 id='associatedtype.Output' class="type"><span id='Output.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#associatedtype.Output' class="type">Output</a> = E</code></span></h4>
<div class='docblock'><p>The returned type after indexing.</p>
</div><h4 id='method.index' class="method"><span id='index.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.Index.html#tymethod.index' class='fnname'>index</a>(&amp;self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>N, N<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>E</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#699-703' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the indexing (<code>container[index]</code>) operation.</p>
</div></div><h3 id='impl-IndexMut%3C(N%2C%20N)%3E' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html" title="trait core::ops::index::IndexMut">IndexMut</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>N, N<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt; for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-IndexMut%3C(N%2C%20N)%3E' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#707-715' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Index <code>GraphMap</code> by node pairs to access edge weights.</p>
</div><div class='impl-items'><h4 id='method.index_mut' class="method"><span id='index_mut.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/index/trait.IndexMut.html#tymethod.index_mut' class='fnname'>index_mut</a>(&amp;mut self, index: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>N, N<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>E</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#711-714' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Performs the mutable indexing (<code>container[index]</code>) operation.</p>
</div></div><h3 id='impl-Default' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-Default' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#718-723' title='goto source code'>[src]</a></span></h3>
<div class='docblock'><p>Create a new empty <code>GraphMap</code>.</p>
</div><div class='impl-items'><h4 id='method.default' class="method"><span id='default.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default' class='fnname'>default</a>() -&gt; Self</code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#722' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Returns the &quot;default value&quot; for a type. <a href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html#tymethod.default">Read more</a></p>
</div></div><h3 id='impl-IntoNodeIdentifiers' class='impl'><span class='in-band'><code>impl&lt;'a, N, E:&nbsp;'a, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.IntoNodeIdentifiers.html" title="trait petgraph::visit::IntoNodeIdentifiers">IntoNodeIdentifiers</a> for &amp;'a <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-IntoNodeIdentifiers' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#793-806' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.NodeIdentifiers' class="type"><span id='NodeIdentifiers.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoNodeIdentifiers.html#associatedtype.NodeIdentifiers' class="type">NodeIdentifiers</a> = <a class="struct" href="../../petgraph/graphmap/struct.NodeIdentifiers.html" title="struct petgraph::graphmap::NodeIdentifiers">NodeIdentifiers</a>&lt;'a, N, E, Ty&gt;</code></span></h4>
<h4 id='method.node_identifiers' class="method"><span id='node_identifiers.v' class='invisible'><code>fn <a href='../../petgraph/visit/trait.IntoNodeIdentifiers.html#tymethod.node_identifiers' class='fnname'>node_identifiers</a>(self) -&gt; Self::<a class="type" href="../../petgraph/visit/trait.IntoNodeIdentifiers.html#associatedtype.NodeIdentifiers" title="type petgraph::visit::IntoNodeIdentifiers::NodeIdentifiers">NodeIdentifiers</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#799-805' title='goto source code'>[src]</a></span></h4>
</div><h3 id='impl-NodeCount' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.NodeCount.html" title="trait petgraph::visit::NodeCount">NodeCount</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-NodeCount' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#808-815' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.node_count-1' class="method"><span id='node_count.v-1' class='invisible'><code>fn <a href='../../petgraph/visit/trait.NodeCount.html#tymethod.node_count' class='fnname'>node_count</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#812-814' title='goto source code'>[src]</a></span></h4>
</div><h3 id='impl-IntoNodeReferences' class='impl'><span class='in-band'><code>impl&lt;'a, N, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.IntoNodeReferences.html" title="trait petgraph::visit::IntoNodeReferences">IntoNodeReferences</a> for &amp;'a <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-IntoNodeReferences' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#834-847' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='associatedtype.NodeRef' class="type"><span id='NodeRef.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoNodeReferences.html#associatedtype.NodeRef' class="type">NodeRef</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>N, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>N<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></span></h4>
<h4 id='associatedtype.NodeReferences' class="type"><span id='NodeReferences.t' class='invisible'><code>type <a href='../../petgraph/visit/trait.IntoNodeReferences.html#associatedtype.NodeReferences' class="type">NodeReferences</a> = <a class="struct" href="../../petgraph/graphmap/struct.NodeReferences.html" title="struct petgraph::graphmap::NodeReferences">NodeReferences</a>&lt;'a, N, E, Ty&gt;</code></span></h4>
<h4 id='method.node_references' class="method"><span id='node_references.v' class='invisible'><code>fn <a href='../../petgraph/visit/trait.IntoNodeReferences.html#tymethod.node_references' class='fnname'>node_references</a>(self) -&gt; Self::<a class="type" href="../../petgraph/visit/trait.IntoNodeReferences.html#associatedtype.NodeReferences" title="type petgraph::visit::IntoNodeReferences::NodeReferences">NodeReferences</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#840-846' title='goto source code'>[src]</a></span></h4>
</div><h3 id='impl-NodeIndexable' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.NodeIndexable.html" title="trait petgraph::visit::NodeIndexable">NodeIndexable</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-NodeIndexable' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#866-879' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.node_bound' class="method"><span id='node_bound.v' class='invisible'><code>fn <a href='../../petgraph/visit/trait.NodeIndexable.html#tymethod.node_bound' class='fnname'>node_bound</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#870' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Return an upper bound of the node indices in the graph (suitable for the size of a bitmap). <a href="../../petgraph/visit/trait.NodeIndexable.html#tymethod.node_bound">Read more</a></p>
</div><h4 id='method.to_index' class="method"><span id='to_index.v' class='invisible'><code>fn <a href='../../petgraph/visit/trait.NodeIndexable.html#tymethod.to_index' class='fnname'>to_index</a>(&amp;self, ix: Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#871-874' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Convert <code>a</code> to an integer index.</p>
</div><h4 id='method.from_index' class="method"><span id='from_index.v' class='invisible'><code>fn <a href='../../petgraph/visit/trait.NodeIndexable.html#tymethod.from_index' class='fnname'>from_index</a>(&amp;self, ix: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; Self::<a class="type" href="../../petgraph/visit/trait.GraphBase.html#associatedtype.NodeId" title="type petgraph::visit::GraphBase::NodeId">NodeId</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#875-878' title='goto source code'>[src]</a></span></h4>
<div class='docblock'><p>Convert <code>i</code> to a node index</p>
</div></div><h3 id='impl-NodeCompactIndexable' class='impl'><span class='in-band'><code>impl&lt;N, E, Ty&gt; <a class="trait" href="../../petgraph/visit/trait.NodeCompactIndexable.html" title="trait petgraph::visit::NodeCompactIndexable">NodeCompactIndexable</a> for <a class="struct" href="../../petgraph/graphmap/struct.GraphMap.html" title="struct petgraph::graphmap::GraphMap">GraphMap</a>&lt;N, E, Ty&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;N: <a class="trait" href="../../petgraph/graphmap/trait.NodeTrait.html" title="trait petgraph::graphmap::NodeTrait">NodeTrait</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;Ty: <a class="trait" href="../../petgraph/trait.EdgeType.html" title="trait petgraph::EdgeType">EdgeType</a>,&nbsp;</span></code><a href='#impl-NodeCompactIndexable' class='anchor'></a></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/petgraph/graphmap.rs.html#881-885' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt><kbd>?</kbd></dt>
<dd>Show this help dialog</dd>
<dt><kbd>S</kbd></dt>
<dd>Focus the search field</dd>
<dt><kbd></kbd></dt>
<dd>Move up in search results</dd>
<dt><kbd></kbd></dt>
<dd>Move down in search results</dd>
<dt><kbd></kbd></dt>
<dd>Switch tab</dd>
<dt><kbd>&#9166;</kbd></dt>
<dd>Go to active search result</dd>
<dt><kbd>+</kbd></dt>
<dd>Expand all sections</dd>
<dt><kbd>-</kbd></dt>
<dd>Collapse all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "petgraph";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>