This commit is contained in:
dabreegster 2021-03-26 04:10:56 +00:00
parent b866592459
commit 90767091ae
28 changed files with 238 additions and 265 deletions

View File

@ -1,6 +1,6 @@
<!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 `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[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><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></p><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</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/game/home/runner/work/abstreet/abstreet/target/debug/build/game-e51c0a1cdd4549fe/out/built.rs.html#53" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Thu, 25 Mar 2021 23:50:58 +0000&quot;;</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</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/game/home/runner/work/abstreet/abstreet/target/debug/build/game-e51c0a1cdd4549fe/out/built.rs.html#53" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Fri, 26 Mar 2021 04:08:46 +0000&quot;;</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<!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 `round` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, round"><title>map_model::pathfind::ch::round - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">ch</a></p><div id="sidebar-vars" data-name="round" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">ch</a>::<wbr><a class="fn" href="">round</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/map_model/pathfind/ch.rs.html#113-116" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn round(cost: <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">ch</a>::<wbr><a class="fn" href="">round</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/map_model/pathfind/ch.rs.html#108-111" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn round(cost: <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!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 `ch` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, ch"><title>map_model::pathfind::ch - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module ch</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a></p><div id="sidebar-vars" data-name="ch" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a class="mod" href="">ch</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/map_model/pathfind/ch.rs.html#1-116" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Uses https://github.com/easbar/fast_paths. Slower creation during map importing, but very fast
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a class="mod" href="">ch</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/map_model/pathfind/ch.rs.html#1-111" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Uses https://github.com/easbar/fast_paths. Slower creation during map importing, but very fast
queries.</p>
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.ContractionHierarchyPathfinder.html" title="map_model::pathfind::ch::ContractionHierarchyPathfinder struct">ContractionHierarchyPathfinder</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<!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 `build_graph_for_pedestrians` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, build_graph_for_pedestrians"><title>map_model::pathfind::dijkstra::build_graph_for_pedestrians - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a></p><div id="sidebar-vars" data-name="build_graph_for_pedestrians" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">build_graph_for_pedestrians</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/map_model/pathfind/dijkstra.rs.html#87-111" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn build_graph_for_pedestrians(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -&gt; <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>, <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">build_graph_for_pedestrians</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/map_model/pathfind/dijkstra.rs.html#91-115" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn build_graph_for_pedestrians(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -&gt; <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>, <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!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 `build_graph_for_vehicles` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, build_graph_for_vehicles"><title>map_model::pathfind::dijkstra::build_graph_for_vehicles - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a></p><div id="sidebar-vars" data-name="build_graph_for_vehicles" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">build_graph_for_vehicles</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/map_model/pathfind/dijkstra.rs.html#21-34" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn build_graph_for_vehicles(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;constraints: <a class="enum" href="../../../map_model/pathfind/enum.PathConstraints.html" title="enum map_model::pathfind::PathConstraints">PathConstraints</a><br>) -&gt; <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>, <a class="struct" href="../../../map_model/objects/turn/struct.TurnID.html" title="struct map_model::objects::turn::TurnID">TurnID</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">build_graph_for_vehicles</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/map_model/pathfind/dijkstra.rs.html#25-38" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn build_graph_for_vehicles(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;constraints: <a class="enum" href="../../../map_model/pathfind/enum.PathConstraints.html" title="enum map_model::pathfind::PathConstraints">PathConstraints</a><br>) -&gt; <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>, <a class="struct" href="../../../map_model/objects/turn/struct.TurnID.html" title="struct map_model::objects::turn::TurnID">TurnID</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!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 `calc_path` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, calc_path"><title>map_model::pathfind::dijkstra::calc_path - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a></p><div id="sidebar-vars" data-name="calc_path" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">calc_path</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/map_model/pathfind/dijkstra.rs.html#54-85" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn calc_path(<br>&nbsp;&nbsp;&nbsp;&nbsp;graph: <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>, <a class="struct" href="../../../map_model/objects/turn/struct.TurnID.html" title="struct map_model::objects::turn::TurnID">TurnID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;params: &amp;<a class="struct" href="../../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">calc_path</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/map_model/pathfind/dijkstra.rs.html#58-89" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn calc_path(<br>&nbsp;&nbsp;&nbsp;&nbsp;graph: <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>, <a class="struct" href="../../../map_model/objects/turn/struct.TurnID.html" title="struct map_model::objects::turn::TurnID">TurnID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;params: &amp;<a class="struct" href="../../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>, <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!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 `pathfind_avoiding_lanes` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, pathfind_avoiding_lanes"><title>map_model::pathfind::dijkstra::pathfind_avoiding_lanes - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a></p><div id="sidebar-vars" data-name="pathfind_avoiding_lanes" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">pathfind_avoiding_lanes</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/map_model/pathfind/dijkstra.rs.html#36-52" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn pathfind_avoiding_lanes(<br>&nbsp;&nbsp;&nbsp;&nbsp;req: <a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;avoid: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">pathfind_avoiding_lanes</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/map_model/pathfind/dijkstra.rs.html#40-56" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn pathfind_avoiding_lanes(<br>&nbsp;&nbsp;&nbsp;&nbsp;req: <a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;avoid: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>, <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!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 `simple_pathfind` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, simple_pathfind"><title>map_model::pathfind::dijkstra::simple_pathfind - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a></p><div id="sidebar-vars" data-name="simple_pathfind" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">simple_pathfind</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/map_model/pathfind/dijkstra.rs.html#16-19" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn simple_pathfind(<br>&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;params: &amp;<a class="struct" href="../../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">simple_pathfind</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/map_model/pathfind/dijkstra.rs.html#16-23" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn simple_pathfind(<br>&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;params: &amp;<a class="struct" href="../../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>, <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!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 `simple_walking_path` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, simple_walking_path"><title>map_model::pathfind::dijkstra::simple_walking_path - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a></p><div id="sidebar-vars" data-name="simple_walking_path" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">simple_walking_path</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/map_model/pathfind/dijkstra.rs.html#113-126" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn simple_walking_path(<br>&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">dijkstra</a>::<wbr><a class="fn" href="">simple_walking_path</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/map_model/pathfind/dijkstra.rs.html#117-130" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn simple_walking_path(<br>&nbsp;&nbsp;&nbsp;&nbsp;req: &amp;<a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!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 `dijkstra` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, dijkstra"><title>map_model::pathfind::dijkstra - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module dijkstra</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a></p><div id="sidebar-vars" data-name="dijkstra" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a class="mod" href="">dijkstra</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/map_model/pathfind/dijkstra.rs.html#1-126" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Pathfinding without needing to build a separate contraction hierarchy.</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a class="mod" href="">dijkstra</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/map_model/pathfind/dijkstra.rs.html#1-130" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Pathfinding without needing to build a separate contraction hierarchy.</p>
</div><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.build_graph_for_pedestrians.html" title="map_model::pathfind::dijkstra::build_graph_for_pedestrians fn">build_graph_for_pedestrians</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.build_graph_for_vehicles.html" title="map_model::pathfind::dijkstra::build_graph_for_vehicles fn">build_graph_for_vehicles</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.calc_path.html" title="map_model::pathfind::dijkstra::calc_path fn">calc_path</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.pathfind_avoiding_lanes.html" title="map_model::pathfind::dijkstra::pathfind_avoiding_lanes fn">pathfind_avoiding_lanes</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.simple_pathfind.html" title="map_model::pathfind::dijkstra::simple_pathfind fn">simple_pathfind</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.simple_walking_path.html" title="map_model::pathfind::dijkstra::simple_walking_path fn">simple_walking_path</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -9,12 +9,12 @@ explicitly opt into a slower (but preparation-free) pathfinder that just uses Di
maneuever.</p>
</div><h2 id="variants" class="variants small-section-header">
Variants<a href="#variants" class="anchor"></a></h2>
<div id="variant.Dijkstra" class="variant small-section-header"><a href="#variant.Dijkstra" class="anchor field"></a><code>Dijkstra</code></div><div id="variant.CH" class="variant small-section-header"><a href="#variant.CH" class="anchor field"></a><code>CH(<a class="struct" href="../../../map_model/pathfind/ch/struct.ContractionHierarchyPathfinder.html" title="struct map_model::pathfind::ch::ContractionHierarchyPathfinder">ContractionHierarchyPathfinder</a>)</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#23-98" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.pathfind" class="method"><code>pub fn <a href="#method.pathfind" class="fnname">pathfind</a>(&amp;self, req: <a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&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="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#25-27" title="goto source code">[src]</a></h4><div class="docblock"><p>Finds a path from a start to an end for a certain type of agent.</p>
</div><h4 id="method.pathfind_with_params" class="method"><code>pub fn <a href="#method.pathfind_with_params" class="fnname">pathfind_with_params</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;req: <a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;params: &amp;<a class="struct" href="../../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#31-65" title="goto source code">[src]</a></h4><div class="docblock"><p>Finds a path from a start to an end for a certain type of agent. May use custom routing
<div id="variant.Dijkstra" class="variant small-section-header"><a href="#variant.Dijkstra" class="anchor field"></a><code>Dijkstra</code></div><div id="variant.CH" class="variant small-section-header"><a href="#variant.CH" class="anchor field"></a><code>CH(<a class="struct" href="../../../map_model/pathfind/ch/struct.ContractionHierarchyPathfinder.html" title="struct map_model::pathfind::ch::ContractionHierarchyPathfinder">ContractionHierarchyPathfinder</a>)</code></div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="enum" href="../../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#23-100" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.pathfind" class="method"><code>pub fn <a href="#method.pathfind" class="fnname">pathfind</a>(&amp;self, req: <a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&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="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#25-27" title="goto source code">[src]</a></h4><div class="docblock"><p>Finds a path from a start to an end for a certain type of agent.</p>
</div><h4 id="method.pathfind_with_params" class="method"><code>pub fn <a href="#method.pathfind_with_params" class="fnname">pathfind_with_params</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;req: <a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;params: &amp;<a class="struct" href="../../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#31-67" title="goto source code">[src]</a></h4><div class="docblock"><p>Finds a path from a start to an end for a certain type of agent. May use custom routing
parameters.</p>
</div><h4 id="method.pathfind_avoiding_lanes" class="method"><code>pub fn <a href="#method.pathfind_avoiding_lanes" class="fnname">pathfind_avoiding_lanes</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;req: <a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;avoid: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#69-76" title="goto source code">[src]</a></h4><div class="docblock"><p>Note this is a slower implementation, never using contraction hierarchies. Used for
</div><h4 id="method.pathfind_avoiding_lanes" class="method"><code>pub fn <a href="#method.pathfind_avoiding_lanes" class="fnname">pathfind_avoiding_lanes</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;req: <a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;avoid: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../../map_model/objects/lane/struct.LaneID.html" title="struct map_model::objects::lane::LaneID">LaneID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</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;<a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a>&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#71-78" title="goto source code">[src]</a></h4><div class="docblock"><p>Note this is a slower implementation, never using contraction hierarchies. Used for
experimental congestion capping.</p>
</div><h4 id="method.should_use_transit" class="method"><code>pub fn <a href="#method.should_use_transit" class="fnname">should_use_transit</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../../../map_model/traversable/struct.Position.html" title="struct map_model::traversable::Position">Position</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;end: <a class="struct" href="../../../map_model/traversable/struct.Position.html" title="struct map_model::traversable::Position">Position</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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../map_model/objects/bus_stop/struct.BusStopID.html" title="struct map_model::objects::bus_stop::BusStopID">BusStopID</a>, <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="struct" href="../../../map_model/objects/bus_stop/struct.BusStopID.html" title="struct map_model::objects::bus_stop::BusStopID">BusStopID</a>&gt;, <a class="struct" href="../../../map_model/objects/bus_stop/struct.BusRouteID.html" title="struct map_model::objects::bus_stop::BusRouteID">BusRouteID</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#79-90" title="goto source code">[src]</a></h4><h4 id="method.apply_edits" class="method"><code>pub fn <a href="#method.apply_edits" class="fnname">apply_edits</a>(&amp;mut self, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;)</code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#92-97" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="enum" href="../../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#17" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#17" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div><h4 id="method.should_use_transit" class="method"><code>pub fn <a href="#method.should_use_transit" class="fnname">should_use_transit</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../../../map_model/traversable/struct.Position.html" title="struct map_model::traversable::Position">Position</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;end: <a class="struct" href="../../../map_model/traversable/struct.Position.html" title="struct map_model::traversable::Position">Position</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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../map_model/objects/bus_stop/struct.BusStopID.html" title="struct map_model::objects::bus_stop::BusStopID">BusStopID</a>, <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="struct" href="../../../map_model/objects/bus_stop/struct.BusStopID.html" title="struct map_model::objects::bus_stop::BusStopID">BusStopID</a>&gt;, <a class="struct" href="../../../map_model/objects/bus_stop/struct.BusRouteID.html" title="struct map_model::objects::bus_stop::BusRouteID">BusRouteID</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#81-92" title="goto source code">[src]</a></h4><h4 id="method.apply_edits" class="method"><code>pub fn <a href="#method.apply_edits" class="fnname">apply_edits</a>(&amp;mut self, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;)</code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#94-99" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="enum" href="../../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#17" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#17" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="enum" href="../../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#17" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class="srclink" href="../../../src/map_model/pathfind/pathfinder.rs.html#17" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/map_model/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/map_model/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/map_model/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/map_model/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/map_model/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>

View File

@ -1,7 +1,7 @@
<!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 `pathfinder` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, pathfinder"><title>map_model::pathfind::pathfinder - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module pathfinder</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#enums">Enums</a></li></ul></div><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a></p><div id="sidebar-vars" data-name="pathfinder" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a class="mod" href="">pathfinder</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/map_model/pathfind/pathfinder.rs.html#1-98" title="goto source code">[src]</a></span></h1><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a class="mod" href="">pathfinder</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/map_model/pathfind/pathfinder.rs.html#1-100" title="goto source code">[src]</a></span></h1><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>
<table><tr class="module-item"><td><a class="enum" href="enum.Pathfinder.html" title="map_model::pathfind::pathfinder::Pathfinder enum">Pathfinder</a></td><td class="docblock-short"><p>Most of the time, prefer using the faster contraction hierarchies. But sometimes, callers can
explicitly opt into a slower (but preparation-free) pathfinder that just uses Dijkstra's
maneuever.</p>

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<!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 `make_input_graph` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, make_input_graph"><title>map_model::pathfind::walking::make_input_graph - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a></p><div id="sidebar-vars" data-name="make_input_graph" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="fn" href="">make_input_graph</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/map_model/pathfind/walking.rs.html#227-272" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_input_graph(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;nodes: &amp;<a class="struct" href="../../../map_model/pathfind/node_map/struct.NodeMap.html" title="struct map_model::pathfind::node_map::NodeMap">NodeMap</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;use_transit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;bus_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;train_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a><br>) -&gt; InputGraph</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="fn" href="">make_input_graph</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/map_model/pathfind/walking.rs.html#211-255" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn make_input_graph(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;nodes: &amp;<a class="struct" href="../../../map_model/pathfind/node_map/struct.NodeMap.html" title="struct map_model::pathfind::node_map::NodeMap">NodeMap</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;use_transit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;bus_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a><br>) -&gt; InputGraph</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!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 `one_step_walking_path` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, one_step_walking_path"><title>map_model::pathfind::walking::one_step_walking_path - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a></p><div id="sidebar-vars" data-name="one_step_walking_path" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="fn" href="">one_step_walking_path</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/map_model/pathfind/walking.rs.html#455-480" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn one_step_walking_path(req: &amp;<a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="fn" href="">one_step_walking_path</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/map_model/pathfind/walking.rs.html#441-466" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn one_step_walking_path(req: &amp;<a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="../../../map_model/pathfind/struct.Path.html" title="struct map_model::pathfind::Path">Path</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!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 `transit_input_graph` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, transit_input_graph"><title>map_model::pathfind::walking::transit_input_graph - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a></p><div id="sidebar-vars" data-name="transit_input_graph" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="fn" href="">transit_input_graph</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/map_model/pathfind/walking.rs.html#274-383" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn transit_input_graph(<br>&nbsp;&nbsp;&nbsp;&nbsp;input_graph: &amp;mut InputGraph, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;nodes: &amp;<a class="struct" href="../../../map_model/pathfind/node_map/struct.NodeMap.html" title="struct map_model::pathfind::node_map::NodeMap">NodeMap</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;bus_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;train_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a><br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="fn" href="">transit_input_graph</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/map_model/pathfind/walking.rs.html#257-369" title="goto source code">[src]</a></span></h1><pre class="rust fn">fn transit_input_graph(<br>&nbsp;&nbsp;&nbsp;&nbsp;input_graph: &amp;mut InputGraph, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;nodes: &amp;<a class="struct" href="../../../map_model/pathfind/node_map/struct.NodeMap.html" title="struct map_model::pathfind::node_map::NodeMap">NodeMap</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;bus_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a><br>)</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!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 `walking_cost` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, walking_cost"><title>map_model::pathfind::walking::walking_cost - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a></p><div id="sidebar-vars" data-name="walking_cost" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="fn" href="">walking_cost</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/map_model/pathfind/walking.rs.html#386-389" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn walking_cost(dist: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>) -&gt; <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="fn" href="">walking_cost</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/map_model/pathfind/walking.rs.html#372-375" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn walking_cost(dist: <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>) -&gt; <a class="struct" href="../../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,5 +1,5 @@
<!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 `walking_path_to_steps` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, walking_path_to_steps"><title>map_model::pathfind::walking::walking_path_to_steps - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a></p><div id="sidebar-vars" data-name="walking_path_to_steps" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="fn" href="">walking_path_to_steps</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/map_model/pathfind/walking.rs.html#391-453" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn walking_path_to_steps(path: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../../../map_model/pathfind/enum.PathStep.html" title="enum map_model::pathfind::PathStep">PathStep</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="fn" href="">walking_path_to_steps</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/map_model/pathfind/walking.rs.html#377-439" title="goto source code">[src]</a></span></h1><pre class="rust fn">pub fn walking_path_to_steps(path: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../../../map_model/pathfind/enum.PathStep.html" title="enum map_model::pathfind::PathStep">PathStep</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="map_model"></div>
<script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!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 `walking` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, walking"><title>map_model::pathfind::walking - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module walking</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a></p><div id="sidebar-vars" data-name="walking" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a class="mod" href="">walking</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/map_model/pathfind/walking.rs.html#1-480" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Pathfinding for pedestrians using contraction hierarchies, as well as figuring out if somebody
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a class="mod" href="">walking</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/map_model/pathfind/walking.rs.html#1-466" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Pathfinding for pedestrians using contraction hierarchies, as well as figuring out if somebody
should use public transit.</p>
</div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.SidewalkPathfinder.html" title="map_model::pathfind::walking::SidewalkPathfinder struct">SidewalkPathfinder</a></td><td class="docblock-short"></td></tr></table><h2 id="enums" class="section-header"><a href="#enums">Enums</a></h2>

View File

@ -1,17 +1,17 @@
<!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 `SidewalkPathfinder` struct in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, SidewalkPathfinder"><title>map_model::pathfind::walking::SidewalkPathfinder - 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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct SidewalkPathfinder</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.graph">graph</a><a href="#structfield.nodes">nodes</a><a href="#structfield.path_calc">path_calc</a><a href="#structfield.use_transit">use_transit</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.apply_edits">apply_edits</a><a href="#method.new">new</a><a href="#method.pathfind">pathfind</a><a href="#method.should_use_transit">should_use_transit</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-Serialize">Serialize</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class="location"><a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a></p><div id="sidebar-vars" data-name="SidewalkPathfinder" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="struct" href="">SidewalkPathfinder</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/map_model/pathfind/walking.rs.html#23-32" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct SidewalkPathfinder {
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">map_model</a>::<wbr><a href="../index.html">pathfind</a>::<wbr><a href="index.html">walking</a>::<wbr><a class="struct" href="">SidewalkPathfinder</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/map_model/pathfind/walking.rs.html#24-33" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct SidewalkPathfinder {
graph: FastGraph,
nodes: <a class="struct" href="../../../map_model/pathfind/node_map/struct.NodeMap.html" title="struct map_model::pathfind::node_map::NodeMap">NodeMap</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;,
use_transit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,
path_calc: ThreadLocal&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html" title="struct core::cell::RefCell">RefCell</a>&lt;PathCalculator&gt;&gt;,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.graph" class="structfield small-section-header"><a href="#structfield.graph" class="anchor field"></a><code>graph: FastGraph</code></span><span id="structfield.nodes" class="structfield small-section-header"><a href="#structfield.nodes" class="anchor field"></a><code>nodes: <a class="struct" href="../../../map_model/pathfind/node_map/struct.NodeMap.html" title="struct map_model::pathfind::node_map::NodeMap">NodeMap</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;</code></span><span id="structfield.use_transit" class="structfield small-section-header"><a href="#structfield.use_transit" class="anchor field"></a><code>use_transit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.path_calc" class="structfield small-section-header"><a href="#structfield.path_calc" class="anchor field"></a><code>path_calc: ThreadLocal&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html" title="struct core::cell::RefCell">RefCell</a>&lt;PathCalculator&gt;&gt;</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#66-225" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;use_transit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;bus_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;train_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a><br>) -&gt; <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#67-105" title="goto source code">[src]</a></h4><h4 id="method.apply_edits" class="method"><code>pub fn <a href="#method.apply_edits" class="fnname">apply_edits</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;bus_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;train_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a><br>)</code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#107-119" title="goto source code">[src]</a></h4><h4 id="method.pathfind" class="method"><code>pub fn <a href="#method.pathfind" class="fnname">pathfind</a>(&amp;self, req: &amp;<a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&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="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#122-134" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the raw nodes</p>
</div><h4 id="method.should_use_transit" class="method"><code>pub fn <a href="#method.should_use_transit" class="fnname">should_use_transit</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../../../map_model/traversable/struct.Position.html" title="struct map_model::traversable::Position">Position</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;end: <a class="struct" href="../../../map_model/traversable/struct.Position.html" title="struct map_model::traversable::Position">Position</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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../map_model/objects/bus_stop/struct.BusStopID.html" title="struct map_model::objects::bus_stop::BusStopID">BusStopID</a>, <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="struct" href="../../../map_model/objects/bus_stop/struct.BusStopID.html" title="struct map_model::objects::bus_stop::BusStopID">BusStopID</a>&gt;, <a class="struct" href="../../../map_model/objects/bus_stop/struct.BusRouteID.html" title="struct map_model::objects::bus_stop::BusRouteID">BusRouteID</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#138-224" title="goto source code">[src]</a></h4><div class="docblock"><p>Attempt the pathfinding and see if we should ride a bus. If so, says (stop1, optional stop
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.graph" class="structfield small-section-header"><a href="#structfield.graph" class="anchor field"></a><code>graph: FastGraph</code></span><span id="structfield.nodes" class="structfield small-section-header"><a href="#structfield.nodes" class="anchor field"></a><code>nodes: <a class="struct" href="../../../map_model/pathfind/node_map/struct.NodeMap.html" title="struct map_model::pathfind::node_map::NodeMap">NodeMap</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;</code></span><span id="structfield.use_transit" class="structfield small-section-header"><a href="#structfield.use_transit" class="anchor field"></a><code>use_transit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span><span id="structfield.path_calc" class="structfield small-section-header"><a href="#structfield.path_calc" class="anchor field"></a><code>path_calc: ThreadLocal&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html" title="struct core::cell::RefCell">RefCell</a>&lt;PathCalculator&gt;&gt;</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#67-209" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;use_transit: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;bus_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a><br>) -&gt; <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#68-95" title="goto source code">[src]</a></h4><h4 id="method.apply_edits" class="method"><code>pub fn <a href="#method.apply_edits" class="fnname">apply_edits</a>(&amp;mut self, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, bus_graph: &amp;<a class="struct" href="../../../map_model/pathfind/vehicles/struct.VehiclePathfinder.html" title="struct map_model::pathfind::vehicles::VehiclePathfinder">VehiclePathfinder</a>)</code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#97-103" title="goto source code">[src]</a></h4><h4 id="method.pathfind" class="method"><code>pub fn <a href="#method.pathfind" class="fnname">pathfind</a>(&amp;self, req: &amp;<a class="struct" href="../../../map_model/pathfind/struct.PathRequest.html" title="struct map_model::pathfind::PathRequest">PathRequest</a>, map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -&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="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>&gt;&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#106-118" title="goto source code">[src]</a></h4><div class="docblock"><p>Returns the raw nodes</p>
</div><h4 id="method.should_use_transit" class="method"><code>pub fn <a href="#method.should_use_transit" class="fnname">should_use_transit</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../../../map_model/traversable/struct.Position.html" title="struct map_model::traversable::Position">Position</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;end: <a class="struct" href="../../../map_model/traversable/struct.Position.html" title="struct map_model::traversable::Position">Position</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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../../map_model/objects/bus_stop/struct.BusStopID.html" title="struct map_model::objects::bus_stop::BusStopID">BusStopID</a>, <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="struct" href="../../../map_model/objects/bus_stop/struct.BusStopID.html" title="struct map_model::objects::bus_stop::BusStopID">BusStopID</a>&gt;, <a class="struct" href="../../../map_model/objects/bus_stop/struct.BusRouteID.html" title="struct map_model::objects::bus_stop::BusRouteID">BusRouteID</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;</code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#122-208" title="goto source code">[src]</a></h4><div class="docblock"><p>Attempt the pathfinding and see if we should ride a bus. If so, says (stop1, optional stop
2, route). If there's no stop 2, then ride the bus off the border.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#22" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#22" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#22" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#22" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#23" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#23" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#23" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class="srclink" href="../../../src/map_model/pathfind/walking.rs.html#23" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/map_model/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl-Send" class="anchor"></a><a class="srclink" href="../../../src/map_model/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl-Sync" class="anchor"></a><a class="srclink" href="../../../src/map_model/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl-Unpin" class="anchor"></a><a class="srclink" href="../../../src/map_model/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../map_model/pathfind/walking/struct.SidewalkPathfinder.html" title="struct map_model::pathfind::walking::SidewalkPathfinder">SidewalkPathfinder</a></code><a href="#impl-UnwindSafe" class="anchor"></a><a class="srclink" href="../../../src/map_model/lib.rs.html#1" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#131-135" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#207-211" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214-218" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#215" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

@ -122,7 +122,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.51.0 (2fd73fabe 2021-03-23)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Thu, 25 Mar 2021 23:50:58 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Fri, 26 Mar 2021 04:08:46 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -112,11 +112,6 @@
<span id="109">109</span>
<span id="110">110</span>
<span id="111">111</span>
<span id="112">112</span>
<span id="113">113</span>
<span id="114">114</span>
<span id="115">115</span>
<span id="116">116</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! Uses https://github.com/easbar/fast_paths. Slower creation during map importing, but very fast</span>
<span class="doccomment">//! queries.</span>
@ -126,6 +121,7 @@
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">Timer</span>;
<span class="kw">use</span> <span class="ident">geom</span>::<span class="ident">Duration</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">pathfind</span>::<span class="ident">dijkstra</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">pathfind</span>::<span class="ident">vehicles</span>::<span class="ident">VehiclePathfinder</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">pathfind</span>::<span class="ident">walking</span>::{<span class="ident">SidewalkPathfinder</span>, <span class="ident">WalkingNode</span>};
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">BusRouteID</span>, <span class="ident">BusStopID</span>, <span class="ident">Map</span>, <span class="ident">Path</span>, <span class="ident">PathConstraints</span>, <span class="ident">PathRequest</span>, <span class="ident">Position</span>};
@ -135,7 +131,6 @@
<span class="ident">car_graph</span>: <span class="ident">VehiclePathfinder</span>,
<span class="ident">bike_graph</span>: <span class="ident">VehiclePathfinder</span>,
<span class="ident">bus_graph</span>: <span class="ident">VehiclePathfinder</span>,
<span class="ident">train_graph</span>: <span class="ident">VehiclePathfinder</span>,
<span class="ident">walking_graph</span>: <span class="ident">SidewalkPathfinder</span>,
<span class="ident">walking_with_transit_graph</span>: <span class="ident">SidewalkPathfinder</span>,
}
@ -156,24 +151,18 @@
<span class="kw">let</span> <span class="ident">bus_graph</span> <span class="op">=</span> <span class="ident">VehiclePathfinder</span>::<span class="ident">new</span>(<span class="ident">map</span>, <span class="ident">PathConstraints</span>::<span class="ident">Bus</span>, <span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">car_graph</span>));
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">&quot;prepare pathfinding for buses&quot;</span>);
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">&quot;prepare pathfinding for trains&quot;</span>);
<span class="kw">let</span> <span class="ident">train_graph</span> <span class="op">=</span> <span class="ident">VehiclePathfinder</span>::<span class="ident">new</span>(<span class="ident">map</span>, <span class="ident">PathConstraints</span>::<span class="ident">Train</span>, <span class="prelude-val">None</span>);
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">&quot;prepare pathfinding for trains&quot;</span>);
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">&quot;prepare pathfinding for pedestrians&quot;</span>);
<span class="kw">let</span> <span class="ident">walking_graph</span> <span class="op">=</span> <span class="ident">SidewalkPathfinder</span>::<span class="ident">new</span>(<span class="ident">map</span>, <span class="bool-val">false</span>, <span class="kw-2">&amp;</span><span class="ident">bus_graph</span>, <span class="kw-2">&amp;</span><span class="ident">train_graph</span>);
<span class="kw">let</span> <span class="ident">walking_graph</span> <span class="op">=</span> <span class="ident">SidewalkPathfinder</span>::<span class="ident">new</span>(<span class="ident">map</span>, <span class="bool-val">false</span>, <span class="kw-2">&amp;</span><span class="ident">bus_graph</span>);
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">&quot;prepare pathfinding for pedestrians&quot;</span>);
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">&quot;prepare pathfinding for pedestrians using transit&quot;</span>);
<span class="kw">let</span> <span class="ident">walking_with_transit_graph</span> <span class="op">=</span>
<span class="ident">SidewalkPathfinder</span>::<span class="ident">new</span>(<span class="ident">map</span>, <span class="bool-val">true</span>, <span class="kw-2">&amp;</span><span class="ident">bus_graph</span>, <span class="kw-2">&amp;</span><span class="ident">train_graph</span>);
<span class="kw">let</span> <span class="ident">walking_with_transit_graph</span> <span class="op">=</span> <span class="ident">SidewalkPathfinder</span>::<span class="ident">new</span>(<span class="ident">map</span>, <span class="bool-val">true</span>, <span class="kw-2">&amp;</span><span class="ident">bus_graph</span>);
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">&quot;prepare pathfinding for pedestrians using transit&quot;</span>);
<span class="ident">ContractionHierarchyPathfinder</span> {
<span class="ident">car_graph</span>,
<span class="ident">bike_graph</span>,
<span class="ident">bus_graph</span>,
<span class="ident">train_graph</span>,
<span class="ident">walking_graph</span>,
<span class="ident">walking_with_transit_graph</span>,
}
@ -185,7 +174,11 @@
<span class="ident">PathConstraints</span>::<span class="ident">Car</span> <span class="op">=</span><span class="op">&gt;</span> <span class="self">self</span>.<span class="ident">car_graph</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>, <span class="ident">map</span>).<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">p</span>, <span class="kw">_</span>)<span class="op">|</span> <span class="ident">p</span>),
<span class="ident">PathConstraints</span>::<span class="ident">Bike</span> <span class="op">=</span><span class="op">&gt;</span> <span class="self">self</span>.<span class="ident">bike_graph</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>, <span class="ident">map</span>).<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">p</span>, <span class="kw">_</span>)<span class="op">|</span> <span class="ident">p</span>),
<span class="ident">PathConstraints</span>::<span class="ident">Bus</span> <span class="op">=</span><span class="op">&gt;</span> <span class="self">self</span>.<span class="ident">bus_graph</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>, <span class="ident">map</span>).<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">p</span>, <span class="kw">_</span>)<span class="op">|</span> <span class="ident">p</span>),
<span class="ident">PathConstraints</span>::<span class="ident">Train</span> <span class="op">=</span><span class="op">&gt;</span> <span class="self">self</span>.<span class="ident">train_graph</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>, <span class="ident">map</span>).<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">p</span>, <span class="kw">_</span>)<span class="op">|</span> <span class="ident">p</span>),
<span class="comment">// Light rail networks are absolutely tiny; using a contraction hierarchy for them is</span>
<span class="comment">// overkill. And in fact, it costs a bit of memory and file size, so don&#39;t do it!</span>
<span class="ident">PathConstraints</span>::<span class="ident">Train</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">dijkstra</span>::<span class="ident">simple_pathfind</span>(<span class="kw-2">&amp;</span><span class="ident">req</span>, <span class="ident">map</span>.<span class="ident">routing_params</span>(), <span class="ident">map</span>).<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">path</span>, <span class="kw">_</span>)<span class="op">|</span> <span class="ident">path</span>)
}
}
}
@ -216,16 +209,13 @@
<span class="self">self</span>.<span class="ident">bus_graph</span>.<span class="ident">apply_edits</span>(<span class="ident">map</span>);
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">&quot;apply edits to bus pathfinding&quot;</span>);
<span class="comment">// Can&#39;t edit anything related to trains</span>
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">&quot;apply edits to pedestrian pathfinding&quot;</span>);
<span class="self">self</span>.<span class="ident">walking_graph</span>
.<span class="ident">apply_edits</span>(<span class="ident">map</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">bus_graph</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">train_graph</span>);
<span class="self">self</span>.<span class="ident">walking_graph</span>.<span class="ident">apply_edits</span>(<span class="ident">map</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">bus_graph</span>);
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">&quot;apply edits to pedestrian pathfinding&quot;</span>);
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">&quot;apply edits to pedestrian using transit pathfinding&quot;</span>);
<span class="self">self</span>.<span class="ident">walking_with_transit_graph</span>
.<span class="ident">apply_edits</span>(<span class="ident">map</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">bus_graph</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">train_graph</span>);
.<span class="ident">apply_edits</span>(<span class="ident">map</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">bus_graph</span>);
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">&quot;apply edits to pedestrian using transit pathfinding&quot;</span>);
}
}

View File

@ -127,6 +127,10 @@
<span id="124">124</span>
<span id="125">125</span>
<span id="126">126</span>
<span id="127">127</span>
<span id="128">128</span>
<span id="129">129</span>
<span id="130">130</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! Pathfinding without needing to build a separate contraction hierarchy.</span>
@ -143,7 +147,11 @@
<span class="comment">// TODO These should maybe keep the DiGraphMaps as state. It&#39;s cheap to recalculate it for edits.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">simple_pathfind</span>(<span class="ident">req</span>: <span class="kw-2">&amp;</span><span class="ident">PathRequest</span>, <span class="ident">params</span>: <span class="kw-2">&amp;</span><span class="ident">RoutingParams</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Path</span><span class="op">&gt;</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">simple_pathfind</span>(
<span class="ident">req</span>: <span class="kw-2">&amp;</span><span class="ident">PathRequest</span>,
<span class="ident">params</span>: <span class="kw-2">&amp;</span><span class="ident">RoutingParams</span>,
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span>(<span class="ident">Path</span>, <span class="ident">Duration</span>)<span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">graph</span> <span class="op">=</span> <span class="ident">build_graph_for_vehicles</span>(<span class="ident">map</span>, <span class="ident">req</span>.<span class="ident">constraints</span>);
<span class="ident">calc_path</span>(<span class="ident">graph</span>, <span class="ident">req</span>, <span class="ident">params</span>, <span class="ident">map</span>)
}
@ -167,7 +175,7 @@
<span class="ident">req</span>: <span class="ident">PathRequest</span>,
<span class="ident">avoid</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Path</span><span class="op">&gt;</span> {
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span>(<span class="ident">Path</span>, <span class="ident">Duration</span>)<span class="op">&gt;</span> {
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">req</span>.<span class="ident">constraints</span>, <span class="ident">PathConstraints</span>::<span class="ident">Car</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">graph</span>: <span class="ident">DiGraphMap</span><span class="op">&lt;</span><span class="ident">LaneID</span>, <span class="ident">TurnID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">DiGraphMap</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">l</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_lanes</span>() {
@ -186,8 +194,8 @@
<span class="ident">req</span>: <span class="kw-2">&amp;</span><span class="ident">PathRequest</span>,
<span class="ident">params</span>: <span class="kw-2">&amp;</span><span class="ident">RoutingParams</span>,
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Path</span><span class="op">&gt;</span> {
<span class="kw">let</span> (<span class="kw">_</span>, <span class="ident">path</span>) <span class="op">=</span> <span class="ident">petgraph</span>::<span class="ident">algo</span>::<span class="ident">astar</span>(
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span>(<span class="ident">Path</span>, <span class="ident">Duration</span>)<span class="op">&gt;</span> {
<span class="kw">let</span> (<span class="ident">cost</span>, <span class="ident">path</span>) <span class="op">=</span> <span class="ident">petgraph</span>::<span class="ident">algo</span>::<span class="ident">astar</span>(
<span class="kw-2">&amp;</span><span class="ident">graph</span>,
<span class="ident">req</span>.<span class="ident">start</span>.<span class="ident">lane</span>(),
<span class="op">|</span><span class="ident">l</span><span class="op">|</span> <span class="ident">l</span> <span class="op">=</span><span class="op">=</span> <span class="ident">req</span>.<span class="ident">end</span>.<span class="ident">lane</span>(),
@ -211,7 +219,7 @@
}
<span class="ident">steps</span>.<span class="ident">push</span>(<span class="ident">PathStep</span>::<span class="ident">Lane</span>(<span class="ident">req</span>.<span class="ident">end</span>.<span class="ident">lane</span>()));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">steps</span>[<span class="number">0</span>], <span class="ident">PathStep</span>::<span class="ident">Lane</span>(<span class="ident">req</span>.<span class="ident">start</span>.<span class="ident">lane</span>()));
<span class="prelude-val">Some</span>(<span class="ident">Path</span>::<span class="ident">new</span>(<span class="ident">map</span>, <span class="ident">steps</span>, <span class="ident">req</span>.<span class="ident">clone</span>(), <span class="ident">Vec</span>::<span class="ident">new</span>()))
<span class="prelude-val">Some</span>((<span class="ident">Path</span>::<span class="ident">new</span>(<span class="ident">map</span>, <span class="ident">steps</span>, <span class="ident">req</span>.<span class="ident">clone</span>(), <span class="ident">Vec</span>::<span class="ident">new</span>()), <span class="ident">cost</span>))
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">build_graph_for_pedestrians</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">DiGraphMap</span><span class="op">&lt;</span><span class="ident">WalkingNode</span>, <span class="ident">Duration</span><span class="op">&gt;</span> {

View File

@ -1,104 +1,106 @@
<!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="Source of the Rust file `map_model/src/pathfind/pathfinder.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>pathfinder.rs - source</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="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[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><a href='../../../map_model/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
<span id="2"> 2</span>
<span id="3"> 3</span>
<span id="4"> 4</span>
<span id="5"> 5</span>
<span id="6"> 6</span>
<span id="7"> 7</span>
<span id="8"> 8</span>
<span id="9"> 9</span>
<span id="10">10</span>
<span id="11">11</span>
<span id="12">12</span>
<span id="13">13</span>
<span id="14">14</span>
<span id="15">15</span>
<span id="16">16</span>
<span id="17">17</span>
<span id="18">18</span>
<span id="19">19</span>
<span id="20">20</span>
<span id="21">21</span>
<span id="22">22</span>
<span id="23">23</span>
<span id="24">24</span>
<span id="25">25</span>
<span id="26">26</span>
<span id="27">27</span>
<span id="28">28</span>
<span id="29">29</span>
<span id="30">30</span>
<span id="31">31</span>
<span id="32">32</span>
<span id="33">33</span>
<span id="34">34</span>
<span id="35">35</span>
<span id="36">36</span>
<span id="37">37</span>
<span id="38">38</span>
<span id="39">39</span>
<span id="40">40</span>
<span id="41">41</span>
<span id="42">42</span>
<span id="43">43</span>
<span id="44">44</span>
<span id="45">45</span>
<span id="46">46</span>
<span id="47">47</span>
<span id="48">48</span>
<span id="49">49</span>
<span id="50">50</span>
<span id="51">51</span>
<span id="52">52</span>
<span id="53">53</span>
<span id="54">54</span>
<span id="55">55</span>
<span id="56">56</span>
<span id="57">57</span>
<span id="58">58</span>
<span id="59">59</span>
<span id="60">60</span>
<span id="61">61</span>
<span id="62">62</span>
<span id="63">63</span>
<span id="64">64</span>
<span id="65">65</span>
<span id="66">66</span>
<span id="67">67</span>
<span id="68">68</span>
<span id="69">69</span>
<span id="70">70</span>
<span id="71">71</span>
<span id="72">72</span>
<span id="73">73</span>
<span id="74">74</span>
<span id="75">75</span>
<span id="76">76</span>
<span id="77">77</span>
<span id="78">78</span>
<span id="79">79</span>
<span id="80">80</span>
<span id="81">81</span>
<span id="82">82</span>
<span id="83">83</span>
<span id="84">84</span>
<span id="85">85</span>
<span id="86">86</span>
<span id="87">87</span>
<span id="88">88</span>
<span id="89">89</span>
<span id="90">90</span>
<span id="91">91</span>
<span id="92">92</span>
<span id="93">93</span>
<span id="94">94</span>
<span id="95">95</span>
<span id="96">96</span>
<span id="97">97</span>
<span id="98">98</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><pre class="line-numbers"><span id="1"> 1</span>
<span id="2"> 2</span>
<span id="3"> 3</span>
<span id="4"> 4</span>
<span id="5"> 5</span>
<span id="6"> 6</span>
<span id="7"> 7</span>
<span id="8"> 8</span>
<span id="9"> 9</span>
<span id="10"> 10</span>
<span id="11"> 11</span>
<span id="12"> 12</span>
<span id="13"> 13</span>
<span id="14"> 14</span>
<span id="15"> 15</span>
<span id="16"> 16</span>
<span id="17"> 17</span>
<span id="18"> 18</span>
<span id="19"> 19</span>
<span id="20"> 20</span>
<span id="21"> 21</span>
<span id="22"> 22</span>
<span id="23"> 23</span>
<span id="24"> 24</span>
<span id="25"> 25</span>
<span id="26"> 26</span>
<span id="27"> 27</span>
<span id="28"> 28</span>
<span id="29"> 29</span>
<span id="30"> 30</span>
<span id="31"> 31</span>
<span id="32"> 32</span>
<span id="33"> 33</span>
<span id="34"> 34</span>
<span id="35"> 35</span>
<span id="36"> 36</span>
<span id="37"> 37</span>
<span id="38"> 38</span>
<span id="39"> 39</span>
<span id="40"> 40</span>
<span id="41"> 41</span>
<span id="42"> 42</span>
<span id="43"> 43</span>
<span id="44"> 44</span>
<span id="45"> 45</span>
<span id="46"> 46</span>
<span id="47"> 47</span>
<span id="48"> 48</span>
<span id="49"> 49</span>
<span id="50"> 50</span>
<span id="51"> 51</span>
<span id="52"> 52</span>
<span id="53"> 53</span>
<span id="54"> 54</span>
<span id="55"> 55</span>
<span id="56"> 56</span>
<span id="57"> 57</span>
<span id="58"> 58</span>
<span id="59"> 59</span>
<span id="60"> 60</span>
<span id="61"> 61</span>
<span id="62"> 62</span>
<span id="63"> 63</span>
<span id="64"> 64</span>
<span id="65"> 65</span>
<span id="66"> 66</span>
<span id="67"> 67</span>
<span id="68"> 68</span>
<span id="69"> 69</span>
<span id="70"> 70</span>
<span id="71"> 71</span>
<span id="72"> 72</span>
<span id="73"> 73</span>
<span id="74"> 74</span>
<span id="75"> 75</span>
<span id="76"> 76</span>
<span id="77"> 77</span>
<span id="78"> 78</span>
<span id="79"> 79</span>
<span id="80"> 80</span>
<span id="81"> 81</span>
<span id="82"> 82</span>
<span id="83"> 83</span>
<span id="84"> 84</span>
<span id="85"> 85</span>
<span id="86"> 86</span>
<span id="87"> 87</span>
<span id="88"> 88</span>
<span id="89"> 89</span>
<span id="90"> 90</span>
<span id="91"> 91</span>
<span id="92"> 92</span>
<span id="93"> 93</span>
<span id="94"> 94</span>
<span id="95"> 95</span>
<span id="96"> 96</span>
<span id="97"> 97</span>
<span id="98"> 98</span>
<span id="99"> 99</span>
<span id="100">100</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">BTreeSet</span>;
@ -157,11 +159,13 @@
<span class="comment">// should only be happening from the debug UI; be very obnoxious if we start calling it</span>
<span class="comment">// from the simulation or something else.</span>
<span class="macro">warn</span><span class="macro">!</span>(<span class="string">&quot;Pathfinding slowly for {} with custom params&quot;</span>, <span class="ident">req</span>);
<span class="kw">return</span> <span class="ident">dijkstra</span>::<span class="ident">simple_pathfind</span>(<span class="kw-2">&amp;</span><span class="ident">req</span>, <span class="ident">params</span>, <span class="ident">map</span>);
<span class="kw">return</span> <span class="ident">dijkstra</span>::<span class="ident">simple_pathfind</span>(<span class="kw-2">&amp;</span><span class="ident">req</span>, <span class="ident">params</span>, <span class="ident">map</span>).<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">path</span>, <span class="kw">_</span>)<span class="op">|</span> <span class="ident">path</span>);
}
<span class="kw">match</span> <span class="self">self</span> {
<span class="ident">Pathfinder</span>::<span class="ident">Dijkstra</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">dijkstra</span>::<span class="ident">simple_pathfind</span>(<span class="kw-2">&amp;</span><span class="ident">req</span>, <span class="ident">params</span>, <span class="ident">map</span>),
<span class="ident">Pathfinder</span>::<span class="ident">Dijkstra</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">dijkstra</span>::<span class="ident">simple_pathfind</span>(<span class="kw-2">&amp;</span><span class="ident">req</span>, <span class="ident">params</span>, <span class="ident">map</span>).<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">path</span>, <span class="kw">_</span>)<span class="op">|</span> <span class="ident">path</span>)
}
<span class="ident">Pathfinder</span>::<span class="ident">CH</span>(<span class="kw-2">ref</span> <span class="ident">p</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="ident">p</span>.<span class="ident">simple_pathfind</span>(<span class="kw-2">&amp;</span><span class="ident">req</span>, <span class="ident">map</span>),
}
}
@ -174,7 +178,7 @@
<span class="ident">avoid</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">LaneID</span><span class="op">&gt;</span>,
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Path</span><span class="op">&gt;</span> {
<span class="ident">dijkstra</span>::<span class="ident">pathfind_avoiding_lanes</span>(<span class="ident">req</span>, <span class="ident">avoid</span>, <span class="ident">map</span>)
<span class="ident">dijkstra</span>::<span class="ident">pathfind_avoiding_lanes</span>(<span class="ident">req</span>, <span class="ident">avoid</span>, <span class="ident">map</span>).<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">path</span>, <span class="kw">_</span>)<span class="op">|</span> <span class="ident">path</span>)
}
<span class="comment">// TODO Consider returning the walking-only path in the failure case, to avoid wasting work</span>

View File

@ -467,20 +467,6 @@
<span id="464">464</span>
<span id="465">465</span>
<span id="466">466</span>
<span id="467">467</span>
<span id="468">468</span>
<span id="469">469</span>
<span id="470">470</span>
<span id="471">471</span>
<span id="472">472</span>
<span id="473">473</span>
<span id="474">474</span>
<span id="475">475</span>
<span id="476">476</span>
<span id="477">477</span>
<span id="478">478</span>
<span id="479">479</span>
<span id="480">480</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! Pathfinding for pedestrians using contraction hierarchies, as well as figuring out if somebody</span>
<span class="doccomment">//! should use public transit.</span>
@ -495,6 +481,7 @@
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Speed</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">pathfind</span>::<span class="ident">ch</span>::<span class="ident">round</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">pathfind</span>::<span class="ident">dijkstra</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">pathfind</span>::<span class="ident">node_map</span>::{<span class="ident">deserialize_nodemap</span>, <span class="ident">NodeMap</span>};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">pathfind</span>::<span class="ident">vehicles</span>::<span class="ident">VehiclePathfinder</span>;
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">pathfind</span>::<span class="ident">zone_cost</span>;
@ -548,12 +535,7 @@
}
<span class="kw">impl</span> <span class="ident">SidewalkPathfinder</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
<span class="ident">use_transit</span>: <span class="ident">bool</span>,
<span class="ident">bus_graph</span>: <span class="kw-2">&amp;</span><span class="ident">VehiclePathfinder</span>,
<span class="ident">train_graph</span>: <span class="kw-2">&amp;</span><span class="ident">VehiclePathfinder</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">SidewalkPathfinder</span> {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">use_transit</span>: <span class="ident">bool</span>, <span class="ident">bus_graph</span>: <span class="kw-2">&amp;</span><span class="ident">VehiclePathfinder</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">SidewalkPathfinder</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">nodes</span> <span class="op">=</span> <span class="ident">NodeMap</span>::<span class="ident">new</span>();
<span class="comment">// We&#39;re assuming that to start with, no sidewalks are closed for construction!</span>
<span class="kw">for</span> <span class="ident">l</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_lanes</span>() {
@ -573,13 +555,7 @@
}
}
<span class="kw">let</span> <span class="ident">graph</span> <span class="op">=</span> <span class="ident">fast_paths</span>::<span class="ident">prepare</span>(<span class="kw-2">&amp;</span><span class="ident">make_input_graph</span>(
<span class="ident">map</span>,
<span class="kw-2">&amp;</span><span class="ident">nodes</span>,
<span class="ident">use_transit</span>,
<span class="ident">bus_graph</span>,
<span class="ident">train_graph</span>,
));
<span class="kw">let</span> <span class="ident">graph</span> <span class="op">=</span> <span class="ident">fast_paths</span>::<span class="ident">prepare</span>(<span class="kw-2">&amp;</span><span class="ident">make_input_graph</span>(<span class="ident">map</span>, <span class="kw-2">&amp;</span><span class="ident">nodes</span>, <span class="ident">use_transit</span>, <span class="ident">bus_graph</span>));
<span class="ident">SidewalkPathfinder</span> {
<span class="ident">graph</span>,
<span class="ident">nodes</span>,
@ -588,16 +564,10 @@
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">apply_edits</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>,
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
<span class="ident">bus_graph</span>: <span class="kw-2">&amp;</span><span class="ident">VehiclePathfinder</span>,
<span class="ident">train_graph</span>: <span class="kw-2">&amp;</span><span class="ident">VehiclePathfinder</span>,
) {
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">apply_edits</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">bus_graph</span>: <span class="kw-2">&amp;</span><span class="ident">VehiclePathfinder</span>) {
<span class="comment">// The NodeMap is all sidewalks, bus stops, and borders -- it won&#39;t change. So we can also</span>
<span class="comment">// reuse the node ordering.</span>
<span class="kw">let</span> <span class="ident">input_graph</span> <span class="op">=</span>
<span class="ident">make_input_graph</span>(<span class="ident">map</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">nodes</span>, <span class="self">self</span>.<span class="ident">use_transit</span>, <span class="ident">bus_graph</span>, <span class="ident">train_graph</span>);
<span class="kw">let</span> <span class="ident">input_graph</span> <span class="op">=</span> <span class="ident">make_input_graph</span>(<span class="ident">map</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">nodes</span>, <span class="self">self</span>.<span class="ident">use_transit</span>, <span class="ident">bus_graph</span>);
<span class="kw">let</span> <span class="ident">node_ordering</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">graph</span>.<span class="ident">get_node_ordering</span>();
<span class="self">self</span>.<span class="ident">graph</span> <span class="op">=</span> <span class="ident">fast_paths</span>::<span class="ident">prepare_with_order</span>(<span class="kw-2">&amp;</span><span class="ident">input_graph</span>, <span class="kw-2">&amp;</span><span class="ident">node_ordering</span>).<span class="ident">unwrap</span>();
}
@ -713,7 +683,6 @@
<span class="ident">nodes</span>: <span class="kw-2">&amp;</span><span class="ident">NodeMap</span><span class="op">&lt;</span><span class="ident">WalkingNode</span><span class="op">&gt;</span>,
<span class="ident">use_transit</span>: <span class="ident">bool</span>,
<span class="ident">bus_graph</span>: <span class="kw-2">&amp;</span><span class="ident">VehiclePathfinder</span>,
<span class="ident">train_graph</span>: <span class="kw-2">&amp;</span><span class="ident">VehiclePathfinder</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">InputGraph</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">input_graph</span> <span class="op">=</span> <span class="ident">InputGraph</span>::<span class="ident">new</span>();
@ -748,7 +717,7 @@
}
<span class="kw">if</span> <span class="ident">use_transit</span> {
<span class="ident">transit_input_graph</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">input_graph</span>, <span class="ident">map</span>, <span class="ident">nodes</span>, <span class="ident">bus_graph</span>, <span class="ident">train_graph</span>);
<span class="ident">transit_input_graph</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">input_graph</span>, <span class="ident">map</span>, <span class="ident">nodes</span>, <span class="ident">bus_graph</span>);
}
<span class="ident">input_graph</span>.<span class="ident">freeze</span>();
@ -760,7 +729,6 @@
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
<span class="ident">nodes</span>: <span class="kw-2">&amp;</span><span class="ident">NodeMap</span><span class="op">&lt;</span><span class="ident">WalkingNode</span><span class="op">&gt;</span>,
<span class="ident">bus_graph</span>: <span class="kw-2">&amp;</span><span class="ident">VehiclePathfinder</span>,
<span class="ident">train_graph</span>: <span class="kw-2">&amp;</span><span class="ident">VehiclePathfinder</span>,
) {
<span class="comment">// Connect bus stops with both sidewalk endpoints, using the appropriate distance.</span>
<span class="kw">for</span> <span class="ident">stop</span> <span class="kw">in</span> <span class="ident">map</span>.<span class="ident">all_bus_stops</span>().<span class="ident">values</span>() {
@ -774,7 +742,7 @@
};
<span class="comment">// Add some extra penalty to using a bus stop. Otherwise a path might try to pass</span>
<span class="comment">// through it uselessly.</span>
<span class="kw">let</span> <span class="ident">penalty</span> <span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">1.0</span>);
<span class="kw">let</span> <span class="ident">penalty</span> <span class="op">=</span> <span class="ident">Duration</span>::<span class="ident">seconds</span>(<span class="number">10.0</span>);
<span class="kw">let</span> <span class="ident">sidewalk</span> <span class="op">=</span> <span class="ident">nodes</span>.<span class="ident">get</span>(<span class="ident">WalkingNode</span>::<span class="ident">SidewalkEndpoint</span>(<span class="ident">lane</span>.<span class="ident">id</span>, <span class="kw-2">*</span><span class="ident">endpt</span>));
<span class="ident">input_graph</span>.<span class="ident">add_edge</span>(<span class="ident">sidewalk</span>, <span class="ident">ride_bus</span>, <span class="ident">round</span>(<span class="ident">cost</span> <span class="op">+</span> <span class="ident">penalty</span>));
<span class="ident">input_graph</span>.<span class="ident">add_edge</span>(<span class="ident">ride_bus</span>, <span class="ident">sidewalk</span>, <span class="ident">round</span>(<span class="ident">cost</span> <span class="op">+</span> <span class="ident">penalty</span>));
@ -789,19 +757,21 @@
<span class="comment">// TODO Also plug in border starts</span>
<span class="kw">for</span> <span class="ident">pair</span> <span class="kw">in</span> <span class="ident">route</span>.<span class="ident">stops</span>.<span class="ident">windows</span>(<span class="number">2</span>) {
<span class="kw">let</span> (<span class="ident">stop1</span>, <span class="ident">stop2</span>) <span class="op">=</span> (<span class="ident">map</span>.<span class="ident">get_bs</span>(<span class="ident">pair</span>[<span class="number">0</span>]), <span class="ident">map</span>.<span class="ident">get_bs</span>(<span class="ident">pair</span>[<span class="number">1</span>]));
<span class="kw">let</span> <span class="ident">graph</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">route</span>.<span class="ident">route_type</span> {
<span class="ident">PathConstraints</span>::<span class="ident">Bus</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">bus_graph</span>,
<span class="ident">PathConstraints</span>::<span class="ident">Train</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">train_graph</span>,
<span class="kw">let</span> <span class="ident">req</span> <span class="op">=</span> <span class="ident">PathRequest</span> {
<span class="ident">start</span>: <span class="ident">stop1</span>.<span class="ident">driving_pos</span>,
<span class="ident">end</span>: <span class="ident">stop2</span>.<span class="ident">driving_pos</span>,
<span class="ident">constraints</span>: <span class="ident">route</span>.<span class="ident">route_type</span>,
};
<span class="kw">let</span> <span class="ident">maybe_driving_cost</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">route</span>.<span class="ident">route_type</span> {
<span class="ident">PathConstraints</span>::<span class="ident">Bus</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">bus_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&amp;</span><span class="ident">req</span>, <span class="ident">map</span>).<span class="ident">map</span>(<span class="op">|</span>(<span class="kw">_</span>, <span class="ident">cost</span>)<span class="op">|</span> <span class="ident">cost</span>),
<span class="comment">// We always use Dijkstra for trains</span>
<span class="ident">PathConstraints</span>::<span class="ident">Train</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">dijkstra</span>::<span class="ident">simple_pathfind</span>(<span class="kw-2">&amp;</span><span class="ident">req</span>, <span class="ident">map</span>.<span class="ident">routing_params</span>(), <span class="ident">map</span>)
.<span class="ident">map</span>(<span class="op">|</span>(<span class="kw">_</span>, <span class="ident">cost</span>)<span class="op">|</span> <span class="ident">round</span>(<span class="ident">cost</span>))
}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable</span><span class="macro">!</span>(),
};
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="kw">_</span>, <span class="ident">driving_cost</span>)) <span class="op">=</span> <span class="ident">graph</span>.<span class="ident">pathfind</span>(
<span class="kw-2">&amp;</span><span class="ident">PathRequest</span> {
<span class="ident">start</span>: <span class="ident">stop1</span>.<span class="ident">driving_pos</span>,
<span class="ident">end</span>: <span class="ident">stop2</span>.<span class="ident">driving_pos</span>,
<span class="ident">constraints</span>: <span class="ident">route</span>.<span class="ident">route_type</span>,
},
<span class="ident">map</span>,
) {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">driving_cost</span>) <span class="op">=</span> <span class="ident">maybe_driving_cost</span> {
<span class="ident">input_graph</span>.<span class="ident">add_edge</span>(
<span class="ident">nodes</span>.<span class="ident">get</span>(<span class="ident">WalkingNode</span>::<span class="ident">RideBus</span>(<span class="ident">stop1</span>.<span class="ident">id</span>)),
<span class="ident">nodes</span>.<span class="ident">get</span>(<span class="ident">WalkingNode</span>::<span class="ident">RideBus</span>(<span class="ident">stop2</span>.<span class="ident">id</span>)),
@ -816,20 +786,22 @@
}
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">l</span>) <span class="op">=</span> <span class="ident">route</span>.<span class="ident">end_border</span> {
<span class="kw">let</span> <span class="ident">graph</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">route</span>.<span class="ident">route_type</span> {
<span class="ident">PathConstraints</span>::<span class="ident">Bus</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">bus_graph</span>,
<span class="ident">PathConstraints</span>::<span class="ident">Train</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">train_graph</span>,
<span class="kw">let</span> <span class="ident">stop1</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_bs</span>(<span class="kw-2">*</span><span class="ident">route</span>.<span class="ident">stops</span>.<span class="ident">last</span>().<span class="ident">unwrap</span>());
<span class="kw">let</span> <span class="ident">req</span> <span class="op">=</span> <span class="ident">PathRequest</span> {
<span class="ident">start</span>: <span class="ident">stop1</span>.<span class="ident">driving_pos</span>,
<span class="ident">end</span>: <span class="ident">Position</span>::<span class="ident">end</span>(<span class="ident">l</span>, <span class="ident">map</span>),
<span class="ident">constraints</span>: <span class="ident">route</span>.<span class="ident">route_type</span>,
};
<span class="kw">let</span> <span class="ident">maybe_driving_cost</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">route</span>.<span class="ident">route_type</span> {
<span class="ident">PathConstraints</span>::<span class="ident">Bus</span> <span class="op">=</span><span class="op">&gt;</span> <span class="ident">bus_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&amp;</span><span class="ident">req</span>, <span class="ident">map</span>).<span class="ident">map</span>(<span class="op">|</span>(<span class="kw">_</span>, <span class="ident">cost</span>)<span class="op">|</span> <span class="ident">cost</span>),
<span class="comment">// We always use Dijkstra for trains</span>
<span class="ident">PathConstraints</span>::<span class="ident">Train</span> <span class="op">=</span><span class="op">&gt;</span> {
<span class="ident">dijkstra</span>::<span class="ident">simple_pathfind</span>(<span class="kw-2">&amp;</span><span class="ident">req</span>, <span class="ident">map</span>.<span class="ident">routing_params</span>(), <span class="ident">map</span>)
.<span class="ident">map</span>(<span class="op">|</span>(<span class="kw">_</span>, <span class="ident">cost</span>)<span class="op">|</span> <span class="ident">round</span>(<span class="ident">cost</span>))
}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable</span><span class="macro">!</span>(),
};
<span class="kw">let</span> <span class="ident">stop1</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_bs</span>(<span class="kw-2">*</span><span class="ident">route</span>.<span class="ident">stops</span>.<span class="ident">last</span>().<span class="ident">unwrap</span>());
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>((<span class="kw">_</span>, <span class="ident">driving_cost</span>)) <span class="op">=</span> <span class="ident">graph</span>.<span class="ident">pathfind</span>(
<span class="kw-2">&amp;</span><span class="ident">PathRequest</span> {
<span class="ident">start</span>: <span class="ident">stop1</span>.<span class="ident">driving_pos</span>,
<span class="ident">end</span>: <span class="ident">Position</span>::<span class="ident">end</span>(<span class="ident">l</span>, <span class="ident">map</span>),
<span class="ident">constraints</span>: <span class="ident">route</span>.<span class="ident">route_type</span>,
},
<span class="ident">map</span>,
) {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">driving_cost</span>) <span class="op">=</span> <span class="ident">maybe_driving_cost</span> {
<span class="kw">let</span> <span class="ident">border</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">map</span>.<span class="ident">get_l</span>(<span class="ident">l</span>).<span class="ident">dst_i</span>);
<span class="ident">input_graph</span>.<span class="ident">add_edge</span>(
<span class="ident">nodes</span>.<span class="ident">get</span>(<span class="ident">WalkingNode</span>::<span class="ident">RideBus</span>(<span class="ident">stop1</span>.<span class="ident">id</span>)),