mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 09:24:26 +03:00
deploy: 17e850908c
This commit is contained in:
parent
4eea22db59
commit
47cafe4d6f
@ -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 `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 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">☰</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><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-dbd8f61b42b849fa/out/built.rs.html#49' title='goto source code'>[src]</a></span><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></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Wed, 02 Dec 2020 16:58:29 +0000";</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='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-dbd8f61b42b849fa/out/built.rs.html#49' title='goto source code'>[src]</a></span><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></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = "Wed, 02 Dec 2020 17:40:59 +0000";</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><script>window.rootPath = "../../../";window.currentCrate = "game";</script><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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
<!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::connectivity::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 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">☰</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'>connectivity</a></p><script>window.sidebarCurrent = {name: 'build_graph_for_pedestrians', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/map_model/pathfind/dijkstra.rs.html#87-110' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>map_model</a>::<wbr><a href='index.html'>connectivity</a>::<wbr><a class="fn" href=''>build_graph_for_pedestrians</a></span></h1><pre class='rust fn'>pub fn build_graph_for_pedestrians(map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a><<a class="enum" href="../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>, <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><script>window.rootPath = "../../";window.currentCrate = "map_model";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
<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='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/map_model/pathfind/dijkstra.rs.html#88-111' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>map_model</a>::<wbr><a href='index.html'>connectivity</a>::<wbr><a class="fn" href=''>build_graph_for_pedestrians</a></span></h1><pre class='rust fn'>pub fn build_graph_for_pedestrians(map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a><<a class="enum" href="../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>, <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><script>window.rootPath = "../../";window.currentCrate = "map_model";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
@ -1,4 +1,4 @@
|
||||
<!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::connectivity::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 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">☰</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'>connectivity</a></p><script>window.sidebarCurrent = {name: 'build_graph_for_vehicles', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/map_model/pathfind/dijkstra.rs.html#28-42' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>map_model</a>::<wbr><a href='index.html'>connectivity</a>::<wbr><a class="fn" href=''>build_graph_for_vehicles</a></span></h1><pre class='rust fn'>pub fn build_graph_for_vehicles(<br> map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> constraints: <a class="enum" href="../../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a><br>) -> <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a><<a class="struct" href="../../map_model/struct.LaneID.html" title="struct map_model::LaneID">LaneID</a>, <a class="struct" href="../../map_model/struct.TurnID.html" title="struct map_model::TurnID">TurnID</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "map_model";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
||||
<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='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/map_model/pathfind/dijkstra.rs.html#29-43' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>map_model</a>::<wbr><a href='index.html'>connectivity</a>::<wbr><a class="fn" href=''>build_graph_for_vehicles</a></span></h1><pre class='rust fn'>pub fn build_graph_for_vehicles(<br> map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> constraints: <a class="enum" href="../../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a><br>) -> <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a><<a class="struct" href="../../map_model/struct.LaneID.html" title="struct map_model::LaneID">LaneID</a>, <a class="struct" href="../../map_model/struct.TurnID.html" title="struct map_model::TurnID">TurnID</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "map_model";</script><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
@ -1,4 +1,4 @@
|
||||
<!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 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">☰</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><script>window.sidebarCurrent = {name: 'build_graph_for_pedestrians', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#87-110' title='goto source code'>[src]</a></span><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></h1><pre class='rust fn'>pub fn build_graph_for_pedestrians(map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a><<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>, <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><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<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='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#88-111' title='goto source code'>[src]</a></span><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></h1><pre class='rust fn'>pub fn build_graph_for_pedestrians(map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a><<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>, <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><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,4 +1,4 @@
|
||||
<!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 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">☰</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><script>window.sidebarCurrent = {name: 'build_graph_for_vehicles', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#28-42' title='goto source code'>[src]</a></span><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></h1><pre class='rust fn'>pub fn build_graph_for_vehicles(<br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> constraints: <a class="enum" href="../../../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a><br>) -> <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a><<a class="struct" href="../../../map_model/struct.LaneID.html" title="struct map_model::LaneID">LaneID</a>, <a class="struct" href="../../../map_model/struct.TurnID.html" title="struct map_model::TurnID">TurnID</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<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='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#29-43' title='goto source code'>[src]</a></span><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></h1><pre class='rust fn'>pub fn build_graph_for_vehicles(<br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br> constraints: <a class="enum" href="../../../map_model/enum.PathConstraints.html" title="enum map_model::PathConstraints">PathConstraints</a><br>) -> <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a><<a class="struct" href="../../../map_model/struct.LaneID.html" title="struct map_model::LaneID">LaneID</a>, <a class="struct" href="../../../map_model/struct.TurnID.html" title="struct map_model::TurnID">TurnID</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,4 +1,4 @@
|
||||
<!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 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">☰</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><script>window.sidebarCurrent = {name: 'calc_path', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#62-83' title='goto source code'>[src]</a></span><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></h1><pre class='rust fn'>fn calc_path(<br> graph: <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a><<a class="struct" href="../../../map_model/struct.LaneID.html" title="struct map_model::LaneID">LaneID</a>, <a class="struct" href="../../../map_model/struct.TurnID.html" title="struct map_model::TurnID">TurnID</a>>, <br> req: <a class="struct" href="../../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a>, <br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../map_model/struct.Path.html" title="struct map_model::Path">Path</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<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='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#63-84' title='goto source code'>[src]</a></span><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></h1><pre class='rust fn'>fn calc_path(<br> graph: <a class="type" href="https://docs.rs/petgraph/0.4/petgraph/graphmap/type.DiGraphMap.html" title="type petgraph::graphmap::DiGraphMap">DiGraphMap</a><<a class="struct" href="../../../map_model/struct.LaneID.html" title="struct map_model::LaneID">LaneID</a>, <a class="struct" href="../../../map_model/struct.TurnID.html" title="struct map_model::TurnID">TurnID</a>>, <br> req: &<a class="struct" href="../../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a>, <br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../map_model/struct.Path.html" title="struct map_model::Path">Path</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,4 +0,0 @@
|
||||
<!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` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, pathfind"><title>map_model::pathfind::dijkstra::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 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">☰</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><script>window.sidebarCurrent = {name: 'pathfind', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#15-26' title='goto source code'>[src]</a></span><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</a></span></h1><pre class='rust fn'>pub fn pathfind(req: <a class="struct" href="../../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a>, map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../map_model/struct.Path.html" title="struct map_model::Path">Path</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,4 +1,4 @@
|
||||
<!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 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">☰</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><script>window.sidebarCurrent = {name: 'pathfind_avoiding_lanes', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#44-60' title='goto source code'>[src]</a></span><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></h1><pre class='rust fn'>pub fn pathfind_avoiding_lanes(<br> req: <a class="struct" href="../../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a>, <br> 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><<a class="struct" href="../../../map_model/struct.LaneID.html" title="struct map_model::LaneID">LaneID</a>>, <br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../map_model/struct.Path.html" title="struct map_model::Path">Path</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<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='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#45-61' title='goto source code'>[src]</a></span><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></h1><pre class='rust fn'>pub fn pathfind_avoiding_lanes(<br> req: <a class="struct" href="../../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a>, <br> 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><<a class="struct" href="../../../map_model/struct.LaneID.html" title="struct map_model::LaneID">LaneID</a>>, <br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../map_model/struct.Path.html" title="struct map_model::Path">Path</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1,4 +0,0 @@
|
||||
<!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_walking` fn in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, pathfind_walking"><title>map_model::pathfind::dijkstra::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 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">☰</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><script>window.sidebarCurrent = {name: 'pathfind_walking', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#112-125' title='goto source code'>[src]</a></span><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_walking</a></span></h1><pre class='rust fn'>fn pathfind_walking(req: <a class="struct" href="../../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a>, map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -0,0 +1,4 @@
|
||||
<!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 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">☰</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><script>window.sidebarCurrent = {name: 'simple_pathfind', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#16-27' title='goto source code'>[src]</a></span><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></h1><pre class='rust fn'>pub fn simple_pathfind(req: &<a class="struct" href="../../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a>, map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="../../../map_model/struct.Path.html" title="struct map_model::Path">Path</a>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -0,0 +1,4 @@
|
||||
<!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 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">☰</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><script>window.sidebarCurrent = {name: 'simple_walking_path', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#113-126' title='goto source code'>[src]</a></span><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></h1><pre class='rust fn'>pub fn simple_walking_path(<br> req: &<a class="struct" href="../../../map_model/struct.PathRequest.html" title="struct map_model::PathRequest">PathRequest</a>, <br> map: &<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a><br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="enum" href="../../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>>></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -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 `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 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">☰</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><script>window.sidebarCurrent = {name: 'dijkstra', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#1-125' title='goto source code'>[src]</a></span><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></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='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/dijkstra.rs.html#1-126' title='goto source code'>[src]</a></span><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></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.html" title='map_model::pathfind::dijkstra::pathfind fn'>pathfind</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.pathfind_walking.html" title='map_model::pathfind::dijkstra::pathfind_walking fn'>pathfind_walking</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
||||
<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><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -1 +1 @@
|
||||
initSidebarItems({"fn":[["build_graph_for_pedestrians",""],["build_graph_for_vehicles",""],["calc_path",""],["pathfind",""],["pathfind_avoiding_lanes",""],["pathfind_walking",""]]});
|
||||
initSidebarItems({"fn":[["build_graph_for_pedestrians",""],["build_graph_for_vehicles",""],["calc_path",""],["pathfind_avoiding_lanes",""],["simple_pathfind",""],["simple_walking_path",""]]});
|
File diff suppressed because one or more lines are too long
@ -1,23 +1,20 @@
|
||||
<!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` mod in crate `map_model`."><meta name="keywords" content="rust, rustlang, rust-lang, pathfind"><title>map_model::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 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">☰</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 pathfind</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><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></p><script>window.sidebarCurrent = {name: 'pathfind', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#1-653' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>map_model</a>::<wbr><a class="mod" href=''>pathfind</a></span></h1><div class='docblock'><p>Everything related to pathfinding through a map for different types of agents.</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='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/map_model/pathfind/mod.rs.html#1-606' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>map_model</a>::<wbr><a class="mod" href=''>pathfind</a></span></h1><div class='docblock'><p>Everything related to pathfinding through a map for different types of agents.</p>
|
||||
</div><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
|
||||
<table><tr><td><code>pub use self::ch::<a class="struct" href="../../map_model/pathfind/ch/struct.ContractionHierarchyPathfinder.html" title="struct map_model::pathfind::ch::ContractionHierarchyPathfinder">ContractionHierarchyPathfinder</a>;</code></td></tr><tr><td><code>pub use self::dijkstra::<a class="fn" href="../../map_model/connectivity/fn.build_graph_for_pedestrians.html" title="fn map_model::connectivity::build_graph_for_pedestrians">build_graph_for_pedestrians</a>;</code></td></tr><tr><td><code>pub use self::dijkstra::<a class="fn" href="../../map_model/connectivity/fn.build_graph_for_vehicles.html" title="fn map_model::connectivity::build_graph_for_vehicles">build_graph_for_vehicles</a>;</code></td></tr><tr><td><code>pub use self::driving::<a class="fn" href="../../map_model/connectivity/fn.driving_cost.html" title="fn map_model::connectivity::driving_cost">driving_cost</a>;</code></td></tr><tr><td><code>pub use self::walking::<a class="fn" href="../../map_model/pathfind/walking/fn.walking_cost.html" title="fn map_model::pathfind::walking::walking_cost">walking_cost</a>;</code></td></tr><tr><td><code>pub use self::walking::<a class="enum" href="../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<table><tr><td><code>pub use self::ch::<a class="struct" href="../../map_model/pathfind/ch/struct.ContractionHierarchyPathfinder.html" title="struct map_model::pathfind::ch::ContractionHierarchyPathfinder">ContractionHierarchyPathfinder</a>;</code></td></tr><tr><td><code>pub use self::dijkstra::<a class="fn" href="../../map_model/connectivity/fn.build_graph_for_pedestrians.html" title="fn map_model::connectivity::build_graph_for_pedestrians">build_graph_for_pedestrians</a>;</code></td></tr><tr><td><code>pub use self::dijkstra::<a class="fn" href="../../map_model/connectivity/fn.build_graph_for_vehicles.html" title="fn map_model::connectivity::build_graph_for_vehicles">build_graph_for_vehicles</a>;</code></td></tr><tr><td><code>pub use self::driving::<a class="fn" href="../../map_model/connectivity/fn.driving_cost.html" title="fn map_model::connectivity::driving_cost">driving_cost</a>;</code></td></tr><tr><td><code>pub use self::pathfinder::<a class="enum" href="../../map_model/pathfind/pathfinder/enum.Pathfinder.html" title="enum map_model::pathfind::pathfinder::Pathfinder">Pathfinder</a>;</code></td></tr><tr><td><code>pub use self::walking::<a class="fn" href="../../map_model/pathfind/walking/fn.walking_cost.html" title="fn map_model::pathfind::walking::walking_cost">walking_cost</a>;</code></td></tr><tr><td><code>pub use self::walking::<a class="enum" href="../../map_model/connectivity/enum.WalkingNode.html" title="enum map_model::connectivity::WalkingNode">WalkingNode</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
|
||||
<table><tr class='module-item'><td><a class="mod" href="ch/index.html" title='map_model::pathfind::ch mod'>ch</a></td><td class='docblock-short'><p>Uses https://github.com/easbar/fast_paths. Slower creation during map importing, but very fast
|
||||
queries.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="mod" href="dijkstra/index.html" title='map_model::pathfind::dijkstra mod'>dijkstra</a></td><td class='docblock-short'><p>Pathfinding without needing to build a separate contraction hierarchy.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="mod" href="driving/index.html" title='map_model::pathfind::driving mod'>driving</a></td><td class='docblock-short'><p>Pathfinding for cars, bikes, buses, and trains using contraction hierarchies</p>
|
||||
</td></tr><tr class='module-item'><td><a class="mod" href="node_map/index.html" title='map_model::pathfind::node_map mod'>node_map</a></td><td class='docblock-short'><p>Some helpers for working with fast_paths.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="mod" href="uber_turns/index.html" title='map_model::pathfind::uber_turns mod'>uber_turns</a></td><td class='docblock-short'><p>To deal with complicated intersections and short roads in OSM, cluster intersections close
|
||||
</td></tr><tr class='module-item'><td><a class="mod" href="pathfinder/index.html" title='map_model::pathfind::pathfinder mod'>pathfinder</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="mod" href="uber_turns/index.html" title='map_model::pathfind::uber_turns mod'>uber_turns</a></td><td class='docblock-short'><p>To deal with complicated intersections and short roads in OSM, cluster intersections close
|
||||
together and then calculate UberTurns that string together several turns.</p>
|
||||
</td></tr><tr class='module-item'><td><a class="mod" href="walking/index.html" title='map_model::pathfind::walking mod'>walking</a></td><td class='docblock-short'><p>Pathfinding for pedestrians using contraction hierarchies, as well as figuring out if somebody
|
||||
should use public transit.</p>
|
||||
</td></tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
|
||||
<table><tr class='module-item'><td><a class="struct" href="struct.Path.html" title='map_model::pathfind::Path struct'>Path</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.PathRequest.html" title='map_model::pathfind::PathRequest struct'>PathRequest</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
|
||||
<table><tr class='module-item'><td><a class="enum" href="enum.PathConstraints.html" title='map_model::pathfind::PathConstraints enum'>PathConstraints</a></td><td class='docblock-short'><p>Who's asking for a path?</p>
|
||||
</td></tr><tr class='module-item'><td><a class="enum" href="enum.PathStep.html" title='map_model::pathfind::PathStep enum'>PathStep</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="enum" href="enum.Pathfinder.html" title='map_model::pathfind::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>
|
||||
</td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
</td></tr><tr class='module-item'><td><a class="enum" href="enum.PathStep.html" title='map_model::pathfind::PathStep enum'>PathStep</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
|
||||
<table><tr class='module-item'><td><a class="fn" href="fn.validate_continuity.html" title='map_model::pathfind::validate_continuity fn'>validate_continuity</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="fn" href="fn.validate_restrictions.html" title='map_model::pathfind::validate_restrictions fn'>validate_restrictions</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "map_model";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
|
24
rustdoc/map_model/pathfind/pathfinder/enum.Pathfinder.html
Normal file
24
rustdoc/map_model/pathfind/pathfinder/enum.Pathfinder.html
Normal file
File diff suppressed because one or more lines are too long
8
rustdoc/map_model/pathfind/pathfinder/index.html
Normal file
8
rustdoc/map_model/pathfind/pathfinder/index.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!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 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">☰</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><script>window.sidebarCurrent = {name: 'pathfinder', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../../src/map_model/pathfind/pathfinder.rs.html#1-57' title='goto source code'>[src]</a></span><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></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>
|
||||
</td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
1
rustdoc/map_model/pathfind/pathfinder/sidebar-items.js
Normal file
1
rustdoc/map_model/pathfind/pathfinder/sidebar-items.js
Normal file
@ -0,0 +1 @@
|
||||
initSidebarItems({"enum":[["Pathfinder","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."]]});
|
@ -1 +1 @@
|
||||
initSidebarItems({"enum":[["PathConstraints","Who's asking for a path?"],["PathStep",""],["Pathfinder","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."]],"fn":[["validate_continuity",""],["validate_restrictions",""]],"mod":[["ch","Uses https://github.com/easbar/fast_paths. Slower creation during map importing, but very fast queries."],["dijkstra","Pathfinding without needing to build a separate contraction hierarchy."],["driving","Pathfinding for cars, bikes, buses, and trains using contraction hierarchies"],["node_map","Some helpers for working with fast_paths."],["uber_turns","To deal with complicated intersections and short roads in OSM, cluster intersections close together and then calculate UberTurns that string together several turns."],["walking","Pathfinding for pedestrians using contraction hierarchies, as well as figuring out if somebody should use public transit."]],"struct":[["Path",""],["PathRequest",""]]});
|
||||
initSidebarItems({"enum":[["PathConstraints","Who's asking for a path?"],["PathStep",""]],"fn":[["validate_continuity",""],["validate_restrictions",""]],"mod":[["ch","Uses https://github.com/easbar/fast_paths. Slower creation during map importing, but very fast queries."],["dijkstra","Pathfinding without needing to build a separate contraction hierarchy."],["driving","Pathfinding for cars, bikes, buses, and trains using contraction hierarchies"],["node_map","Some helpers for working with fast_paths."],["pathfinder",""],["uber_turns","To deal with complicated intersections and short roads in OSM, cluster intersections close together and then calculate UberTurns that string together several turns."],["walking","Pathfinding for pedestrians using contraction hierarchies, as well as figuring out if somebody should use public transit."]],"struct":[["Path",""],["PathRequest",""]]});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -17,7 +17,7 @@ sourcesIndex["json_to_binary_map"] = {"name":"","files":["json_to_binary_map.rs"
|
||||
sourcesIndex["kml"] = {"name":"","files":["lib.rs"]};
|
||||
sourcesIndex["map_editor"] = {"name":"","files":["main.rs","model.rs","world.rs"]};
|
||||
sourcesIndex["map_gui"] = {"name":"","dirs":[{"name":"render","files":["agents.rs","area.rs","bike.rs","building.rs","bus_stop.rs","car.rs","intersection.rs","lane.rs","map.rs","mod.rs","parking_lot.rs","pedestrian.rs","road.rs","traffic_signal.rs","turn.rs"]},{"name":"tools","files":["city_picker.rs","colors.rs","heatmap.rs","minimap.rs","mod.rs","navigate.rs","turn_explorer.rs","ui.rs","updater.rs"]}],"files":["colors.rs","lib.rs","load.rs","options.rs","simple_app.rs"]};
|
||||
sourcesIndex["map_model"] = {"name":"","dirs":[{"name":"edits","files":["compat.rs","mod.rs","perma.rs"]},{"name":"make","dirs":[{"name":"initial","files":["geometry.rs","lane_specs.rs","mod.rs"]}],"files":["bridges.rs","buildings.rs","medians.rs","mod.rs","parking_lots.rs","remove_disconnected.rs","traffic_signals.rs","transit.rs","turns.rs","walking_turns.rs"]},{"name":"objects","files":["area.rs","building.rs","bus_stop.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","road.rs","stop_signs.rs","traffic_signals.rs","turn.rs","zone.rs"]},{"name":"pathfind","files":["ch.rs","dijkstra.rs","driving.rs","mod.rs","node_map.rs","uber_turns.rs","walking.rs"]}],"files":["city.rs","connectivity.rs","lib.rs","map.rs","osm.rs","raw.rs","traversable.rs"]};
|
||||
sourcesIndex["map_model"] = {"name":"","dirs":[{"name":"edits","files":["compat.rs","mod.rs","perma.rs"]},{"name":"make","dirs":[{"name":"initial","files":["geometry.rs","lane_specs.rs","mod.rs"]}],"files":["bridges.rs","buildings.rs","medians.rs","mod.rs","parking_lots.rs","remove_disconnected.rs","traffic_signals.rs","transit.rs","turns.rs","walking_turns.rs"]},{"name":"objects","files":["area.rs","building.rs","bus_stop.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","road.rs","stop_signs.rs","traffic_signals.rs","turn.rs","zone.rs"]},{"name":"pathfind","files":["ch.rs","dijkstra.rs","driving.rs","mod.rs","node_map.rs","pathfinder.rs","uber_turns.rs","walking.rs"]}],"files":["city.rs","connectivity.rs","lib.rs","map.rs","osm.rs","raw.rs","traversable.rs"]};
|
||||
sourcesIndex["osm_viewer"] = {"name":"","files":["main.rs","viewer.rs"]};
|
||||
sourcesIndex["parking_mapper"] = {"name":"","files":["main.rs","mapper.rs"]};
|
||||
sourcesIndex["random_scenario"] = {"name":"","files":["random_scenario.rs"]};
|
||||
|
@ -114,7 +114,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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"rustdoc 1.48.0 (7eac88abb 2020-11-16)"</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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Wed, 02 Dec 2020 16:58:29 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"Wed, 02 Dec 2020 17:40:59 +0000"</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">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"x86_64"</span>;
|
||||
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>
|
||||
|
@ -424,6 +424,63 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// Doesn't handle zones</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">simple_pathfind</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">req</span>: <span class="kw-2">&</span><span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Path</span><span class="op">></span> {
|
||||
<span class="kw">match</span> <span class="ident">req</span>.<span class="ident">constraints</span> {
|
||||
<span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">steps</span> <span class="op">=</span> <span class="ident">walking_path_to_steps</span>(<span class="self">self</span>.<span class="ident">walking_graph</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>, <span class="ident">map</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">end</span>.<span class="ident">dist_along</span>(), <span class="ident">Vec</span>::<span class="ident">new</span>()))
|
||||
}
|
||||
<span class="ident">PathConstraints</span>::<span class="ident">Car</span> <span class="op">=</span><span class="op">></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">></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">></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">></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="kw">pub</span> <span class="kw">fn</span> <span class="ident">simple_walking_path</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">req</span>: <span class="kw-2">&</span><span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">WalkingNode</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">walking_graph</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>, <span class="ident">map</span>)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">should_use_transit</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
<span class="ident">start</span>: <span class="ident">Position</span>,
|
||||
<span class="ident">end</span>: <span class="ident">Position</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="ident">BusStopID</span>, <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">BusStopID</span><span class="op">></span>, <span class="ident">BusRouteID</span>)<span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">walking_with_transit_graph</span>
|
||||
.<span class="ident">should_use_transit</span>(<span class="ident">map</span>, <span class="ident">start</span>, <span class="ident">end</span>)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">apply_edits</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>, <span class="ident">timer</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Timer</span>) {
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"apply edits to car pathfinding"</span>);
|
||||
<span class="self">self</span>.<span class="ident">car_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">"apply edits to car pathfinding"</span>);
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"apply edits to bike pathfinding"</span>);
|
||||
<span class="self">self</span>.<span class="ident">bike_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">"apply edits to bike pathfinding"</span>);
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"apply edits to bus pathfinding"</span>);
|
||||
<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">"apply edits to bus pathfinding"</span>);
|
||||
|
||||
<span class="comment">// Can't edit anything related to trains</span>
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"apply edits to pedestrian pathfinding"</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">&</span><span class="self">self</span>.<span class="ident">bus_graph</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">train_graph</span>);
|
||||
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">"apply edits to pedestrian pathfinding"</span>);
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"apply edits to pedestrian using transit pathfinding"</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">&</span><span class="self">self</span>.<span class="ident">bus_graph</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">train_graph</span>);
|
||||
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">"apply edits to pedestrian using transit pathfinding"</span>);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="comment">// TODO Lift this out of here</span>
|
||||
<span class="kw">impl</span> <span class="ident">ContractionHierarchyPathfinder</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">pathfind</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">req</span>: <span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Path</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">req</span>.<span class="ident">start</span>.<span class="ident">lane</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">req</span>.<span class="ident">end</span>.<span class="ident">lane</span>() <span class="op">&&</span> <span class="ident">req</span>.<span class="ident">constraints</span> <span class="op">=</span><span class="op">=</span> <span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span> {
|
||||
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">one_step_walking_path</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>));
|
||||
@ -496,16 +553,7 @@
|
||||
}
|
||||
(<span class="prelude-val">None</span>, <span class="prelude-val">None</span>) <span class="op">=</span><span class="op">></span> {}
|
||||
}
|
||||
<span class="kw">match</span> <span class="ident">req</span>.<span class="ident">constraints</span> {
|
||||
<span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span> <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">steps</span> <span class="op">=</span> <span class="ident">walking_path_to_steps</span>(<span class="self">self</span>.<span class="ident">walking_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>, <span class="ident">map</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">end</span>.<span class="ident">dist_along</span>(), <span class="ident">Vec</span>::<span class="ident">new</span>()))
|
||||
}
|
||||
<span class="ident">PathConstraints</span>::<span class="ident">Car</span> <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">car_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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">></span> <span class="self">self</span>.<span class="ident">bike_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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">></span> <span class="self">self</span>.<span class="ident">bus_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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">></span> <span class="self">self</span>.<span class="ident">train_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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="self">self</span>.<span class="ident">simple_pathfind</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>)
|
||||
}
|
||||
|
||||
<span class="comment">// TODO Alright, reconsider refactoring pieces of this again. :)</span>
|
||||
@ -574,7 +622,7 @@
|
||||
<span class="ident">one_step</span>.<span class="ident">dedup</span>();
|
||||
<span class="ident">one_step</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="self">self</span>.<span class="ident">walking_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>
|
||||
<span class="self">self</span>.<span class="ident">simple_walking_path</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>
|
||||
};
|
||||
<span class="ident">interior_path</span>.<span class="ident">extend</span>(<span class="ident">main_path</span>);
|
||||
<span class="kw">let</span> <span class="ident">steps</span> <span class="op">=</span> <span class="ident">walking_path_to_steps</span>(<span class="ident">interior_path</span>, <span class="ident">map</span>);
|
||||
@ -582,13 +630,7 @@
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">interior_path</span> <span class="op">=</span> <span class="ident">zone</span>.<span class="ident">pathfind</span>(<span class="ident">interior_req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>;
|
||||
<span class="kw">let</span> <span class="ident">main_path</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">req</span>.<span class="ident">constraints</span> {
|
||||
<span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span> <span class="op">=</span><span class="op">></span> <span class="macro">unreachable</span><span class="macro">!</span>(),
|
||||
<span class="ident">PathConstraints</span>::<span class="ident">Car</span> <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">car_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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">></span> <span class="self">self</span>.<span class="ident">bike_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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">></span> <span class="self">self</span>.<span class="ident">bus_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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">></span> <span class="self">self</span>.<span class="ident">train_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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="question-mark">?</span>;
|
||||
<span class="kw">let</span> <span class="ident">main_path</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">simple_pathfind</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>;
|
||||
<span class="ident">interior_path</span>.<span class="ident">append</span>(<span class="ident">main_path</span>, <span class="ident">map</span>);
|
||||
<span class="prelude-val">Some</span>(<span class="ident">interior_path</span>)
|
||||
}
|
||||
@ -659,7 +701,7 @@
|
||||
<span class="ident">one_step</span>.<span class="ident">dedup</span>();
|
||||
<span class="ident">one_step</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="self">self</span>.<span class="ident">walking_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>
|
||||
<span class="self">self</span>.<span class="ident">simple_walking_path</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>
|
||||
};
|
||||
|
||||
<span class="ident">main_path</span>.<span class="ident">extend</span>(<span class="ident">interior_path</span>);
|
||||
@ -668,53 +710,11 @@
|
||||
}
|
||||
|
||||
<span class="kw">let</span> <span class="ident">interior_path</span> <span class="op">=</span> <span class="ident">zone</span>.<span class="ident">pathfind</span>(<span class="ident">interior_req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">main_path</span> <span class="op">=</span> <span class="kw">match</span> <span class="ident">req</span>.<span class="ident">constraints</span> {
|
||||
<span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span> <span class="op">=</span><span class="op">></span> <span class="macro">unreachable</span><span class="macro">!</span>(),
|
||||
<span class="ident">PathConstraints</span>::<span class="ident">Car</span> <span class="op">=</span><span class="op">></span> <span class="self">self</span>.<span class="ident">car_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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">></span> <span class="self">self</span>.<span class="ident">bike_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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">></span> <span class="self">self</span>.<span class="ident">bus_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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">></span> <span class="self">self</span>.<span class="ident">train_graph</span>.<span class="ident">pathfind</span>(<span class="kw-2">&</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="question-mark">?</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">main_path</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">simple_pathfind</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>;
|
||||
<span class="ident">main_path</span>.<span class="ident">append</span>(<span class="ident">interior_path</span>, <span class="ident">map</span>);
|
||||
<span class="ident">main_path</span>.<span class="ident">end_dist</span> <span class="op">=</span> <span class="ident">orig_end_dist</span>;
|
||||
<span class="prelude-val">Some</span>(<span class="ident">main_path</span>)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">should_use_transit</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
<span class="ident">start</span>: <span class="ident">Position</span>,
|
||||
<span class="ident">end</span>: <span class="ident">Position</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="ident">BusStopID</span>, <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">BusStopID</span><span class="op">></span>, <span class="ident">BusRouteID</span>)<span class="op">></span> {
|
||||
<span class="self">self</span>.<span class="ident">walking_with_transit_graph</span>
|
||||
.<span class="ident">should_use_transit</span>(<span class="ident">map</span>, <span class="ident">start</span>, <span class="ident">end</span>)
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">apply_edits</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>, <span class="ident">timer</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Timer</span>) {
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"apply edits to car pathfinding"</span>);
|
||||
<span class="self">self</span>.<span class="ident">car_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">"apply edits to car pathfinding"</span>);
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"apply edits to bike pathfinding"</span>);
|
||||
<span class="self">self</span>.<span class="ident">bike_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">"apply edits to bike pathfinding"</span>);
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"apply edits to bus pathfinding"</span>);
|
||||
<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">"apply edits to bus pathfinding"</span>);
|
||||
|
||||
<span class="comment">// Can't edit anything related to trains</span>
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"apply edits to pedestrian pathfinding"</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">&</span><span class="self">self</span>.<span class="ident">bus_graph</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">train_graph</span>);
|
||||
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">"apply edits to pedestrian pathfinding"</span>);
|
||||
|
||||
<span class="ident">timer</span>.<span class="ident">start</span>(<span class="string">"apply edits to pedestrian using transit pathfinding"</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">&</span><span class="self">self</span>.<span class="ident">bus_graph</span>, <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">train_graph</span>);
|
||||
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">"apply edits to pedestrian using transit pathfinding"</span>);
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
@ -126,6 +126,7 @@
|
||||
<span id="123">123</span>
|
||||
<span id="124">124</span>
|
||||
<span id="125">125</span>
|
||||
<span id="126">126</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="doccomment">//! Pathfinding without needing to build a separate contraction hierarchy.</span>
|
||||
|
||||
@ -141,12 +142,13 @@
|
||||
|
||||
<span class="comment">// TODO These should maybe keep the DiGraphMaps as state. It's cheap to recalculate it for edits.</span>
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">pathfind</span>(<span class="ident">req</span>: <span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Path</span><span class="op">></span> {
|
||||
<span class="comment">// Doesn't handle zones</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">&</span><span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Path</span><span class="op">></span> {
|
||||
<span class="kw">if</span> <span class="ident">req</span>.<span class="ident">constraints</span> <span class="op">=</span><span class="op">=</span> <span class="ident">PathConstraints</span>::<span class="ident">Pedestrian</span> {
|
||||
<span class="kw">if</span> <span class="ident">req</span>.<span class="ident">start</span>.<span class="ident">lane</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">req</span>.<span class="ident">end</span>.<span class="ident">lane</span>() {
|
||||
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">one_step_walking_path</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>));
|
||||
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">one_step_walking_path</span>(<span class="ident">req</span>, <span class="ident">map</span>));
|
||||
}
|
||||
<span class="kw">let</span> <span class="ident">steps</span> <span class="op">=</span> <span class="ident">walking_path_to_steps</span>(<span class="ident">pathfind_walking</span>(<span class="ident">req</span>.<span class="ident">clone</span>(), <span class="ident">map</span>)<span class="question-mark">?</span>, <span class="ident">map</span>);
|
||||
<span class="kw">let</span> <span class="ident">steps</span> <span class="op">=</span> <span class="ident">walking_path_to_steps</span>(<span class="ident">simple_walking_path</span>(<span class="ident">req</span>, <span class="ident">map</span>)<span class="question-mark">?</span>, <span class="ident">map</span>);
|
||||
<span class="kw">return</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">end</span>.<span class="ident">dist_along</span>(), <span class="ident">Vec</span>::<span class="ident">new</span>()));
|
||||
}
|
||||
|
||||
@ -185,10 +187,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
<span class="ident">calc_path</span>(<span class="ident">graph</span>, <span class="ident">req</span>, <span class="ident">map</span>)
|
||||
<span class="ident">calc_path</span>(<span class="ident">graph</span>, <span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</span>)
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">calc_path</span>(<span class="ident">graph</span>: <span class="ident">DiGraphMap</span><span class="op"><</span><span class="ident">LaneID</span>, <span class="ident">TurnID</span><span class="op">></span>, <span class="ident">req</span>: <span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Path</span><span class="op">></span> {
|
||||
<span class="kw">fn</span> <span class="ident">calc_path</span>(<span class="ident">graph</span>: <span class="ident">DiGraphMap</span><span class="op"><</span><span class="ident">LaneID</span>, <span class="ident">TurnID</span><span class="op">></span>, <span class="ident">req</span>: <span class="kw-2">&</span><span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Path</span><span class="op">></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="kw-2">&</span><span class="ident">graph</span>,
|
||||
<span class="ident">req</span>.<span class="ident">start</span>.<span class="ident">lane</span>(),
|
||||
@ -238,7 +240,7 @@
|
||||
<span class="ident">graph</span>
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">pathfind_walking</span>(<span class="ident">req</span>: <span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">WalkingNode</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">simple_walking_path</span>(<span class="ident">req</span>: <span class="kw-2">&</span><span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Vec</span><span class="op"><</span><span class="ident">WalkingNode</span><span class="op">></span><span class="op">></span> {
|
||||
<span class="kw">let</span> <span class="ident">graph</span> <span class="op">=</span> <span class="ident">build_graph_for_pedestrians</span>(<span class="ident">map</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="ident">closest_start</span> <span class="op">=</span> <span class="ident">WalkingNode</span>::<span class="ident">closest</span>(<span class="ident">req</span>.<span class="ident">start</span>, <span class="ident">map</span>);
|
||||
|
@ -607,78 +607,31 @@
|
||||
<span id="604">604</span>
|
||||
<span id="605">605</span>
|
||||
<span id="606">606</span>
|
||||
<span id="607">607</span>
|
||||
<span id="608">608</span>
|
||||
<span id="609">609</span>
|
||||
<span id="610">610</span>
|
||||
<span id="611">611</span>
|
||||
<span id="612">612</span>
|
||||
<span id="613">613</span>
|
||||
<span id="614">614</span>
|
||||
<span id="615">615</span>
|
||||
<span id="616">616</span>
|
||||
<span id="617">617</span>
|
||||
<span id="618">618</span>
|
||||
<span id="619">619</span>
|
||||
<span id="620">620</span>
|
||||
<span id="621">621</span>
|
||||
<span id="622">622</span>
|
||||
<span id="623">623</span>
|
||||
<span id="624">624</span>
|
||||
<span id="625">625</span>
|
||||
<span id="626">626</span>
|
||||
<span id="627">627</span>
|
||||
<span id="628">628</span>
|
||||
<span id="629">629</span>
|
||||
<span id="630">630</span>
|
||||
<span id="631">631</span>
|
||||
<span id="632">632</span>
|
||||
<span id="633">633</span>
|
||||
<span id="634">634</span>
|
||||
<span id="635">635</span>
|
||||
<span id="636">636</span>
|
||||
<span id="637">637</span>
|
||||
<span id="638">638</span>
|
||||
<span id="639">639</span>
|
||||
<span id="640">640</span>
|
||||
<span id="641">641</span>
|
||||
<span id="642">642</span>
|
||||
<span id="643">643</span>
|
||||
<span id="644">644</span>
|
||||
<span id="645">645</span>
|
||||
<span id="646">646</span>
|
||||
<span id="647">647</span>
|
||||
<span id="648">648</span>
|
||||
<span id="649">649</span>
|
||||
<span id="650">650</span>
|
||||
<span id="651">651</span>
|
||||
<span id="652">652</span>
|
||||
<span id="653">653</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="doccomment">//! Everything related to pathfinding through a map for different types of agents.</span>
|
||||
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::{<span class="ident">BTreeSet</span>, <span class="ident">VecDeque</span>};
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">VecDeque</span>;
|
||||
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fmt</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">enumset</span>::<span class="ident">EnumSetType</span>;
|
||||
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
|
||||
|
||||
<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">Distance</span>, <span class="ident">PolyLine</span>, <span class="ident">EPSILON_DIST</span>};
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="self">self</span>::<span class="ident">ch</span>::<span class="ident">ContractionHierarchyPathfinder</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="self">self</span>::<span class="ident">dijkstra</span>::{<span class="ident">build_graph_for_pedestrians</span>, <span class="ident">build_graph_for_vehicles</span>};
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="self">self</span>::<span class="ident">driving</span>::<span class="ident">driving_cost</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="self">self</span>::<span class="ident">pathfinder</span>::<span class="ident">Pathfinder</span>;
|
||||
<span class="kw">pub</span> <span class="kw">use</span> <span class="self">self</span>::<span class="ident">walking</span>::{<span class="ident">walking_cost</span>, <span class="ident">WalkingNode</span>};
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::{
|
||||
<span class="ident">osm</span>, <span class="ident">BuildingID</span>, <span class="ident">BusRouteID</span>, <span class="ident">BusStopID</span>, <span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneType</span>, <span class="ident">Map</span>, <span class="ident">Position</span>, <span class="ident">Traversable</span>,
|
||||
<span class="ident">TurnID</span>, <span class="ident">UberTurn</span>,
|
||||
<span class="ident">osm</span>, <span class="ident">BuildingID</span>, <span class="ident">Lane</span>, <span class="ident">LaneID</span>, <span class="ident">LaneType</span>, <span class="ident">Map</span>, <span class="ident">Position</span>, <span class="ident">Traversable</span>, <span class="ident">TurnID</span>, <span class="ident">UberTurn</span>,
|
||||
};
|
||||
|
||||
<span class="kw">mod</span> <span class="ident">ch</span>;
|
||||
<span class="kw">mod</span> <span class="ident">dijkstra</span>;
|
||||
<span class="kw">mod</span> <span class="ident">driving</span>;
|
||||
<span class="kw">mod</span> <span class="ident">node_map</span>;
|
||||
<span class="kw">mod</span> <span class="ident">pathfinder</span>;
|
||||
<span class="comment">// TODO tmp</span>
|
||||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">uber_turns</span>;
|
||||
<span class="kw">mod</span> <span class="ident">walking</span>;
|
||||
@ -1261,52 +1214,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Most of the time, prefer using the faster contraction hierarchies. But sometimes, callers can</span>
|
||||
<span class="doccomment">/// explicitly opt into a slower (but preparation-free) pathfinder that just uses Dijkstra's</span>
|
||||
<span class="doccomment">/// maneuever.</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Serialize</span>, <span class="ident">Deserialize</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Pathfinder</span> {
|
||||
<span class="ident">Dijkstra</span>,
|
||||
<span class="ident">CH</span>(<span class="ident">ContractionHierarchyPathfinder</span>),
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Pathfinder</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">pathfind</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">req</span>: <span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Path</span><span class="op">></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">></span> <span class="ident">dijkstra</span>::<span class="ident">pathfind</span>(<span class="ident">req</span>, <span class="ident">map</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">></span> <span class="ident">p</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>, <span class="ident">map</span>),
|
||||
}
|
||||
}
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">pathfind_avoiding_lanes</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">req</span>: <span class="ident">PathRequest</span>,
|
||||
<span class="ident">avoid</span>: <span class="ident">BTreeSet</span><span class="op"><</span><span class="ident">LaneID</span><span class="op">></span>,
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Path</span><span class="op">></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="comment">// TODO Consider returning the walking-only path in the failure case, to avoid wasting work</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">should_use_transit</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
<span class="ident">start</span>: <span class="ident">Position</span>,
|
||||
<span class="ident">end</span>: <span class="ident">Position</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="ident">BusStopID</span>, <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">BusStopID</span><span class="op">></span>, <span class="ident">BusRouteID</span>)<span class="op">></span> {
|
||||
<span class="kw">match</span> <span class="self">self</span> {
|
||||
<span class="comment">// TODO Implement this</span>
|
||||
<span class="ident">Pathfinder</span>::<span class="ident">Dijkstra</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">None</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">></span> <span class="ident">p</span>.<span class="ident">should_use_transit</span>(<span class="ident">map</span>, <span class="ident">start</span>, <span class="ident">end</span>),
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">apply_edits</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>, <span class="ident">timer</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Timer</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">></span> {}
|
||||
<span class="ident">Pathfinder</span>::<span class="ident">CH</span>(<span class="kw-2">ref</span> <span class="kw-2">mut</span> <span class="ident">p</span>) <span class="op">=</span><span class="op">></span> <span class="ident">p</span>.<span class="ident">apply_edits</span>(<span class="ident">map</span>, <span class="ident">timer</span>),
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
120
rustdoc/src/map_model/pathfind/pathfinder.rs.html
Normal file
120
rustdoc/src/map_model/pathfind/pathfinder.rs.html
Normal file
@ -0,0 +1,120 @@
|
||||
<!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 to the Rust file `map_model/src/pathfind/pathfinder.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>pathfinder.rs.html -- 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 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">☰</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!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><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><span class="help-button">?</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>
|
||||
</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>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
|
||||
|
||||
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">Timer</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">pathfind</span>::<span class="ident">ch</span>::<span class="ident">ContractionHierarchyPathfinder</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">BusRouteID</span>, <span class="ident">BusStopID</span>, <span class="ident">LaneID</span>, <span class="ident">Map</span>, <span class="ident">Path</span>, <span class="ident">PathRequest</span>, <span class="ident">Position</span>};
|
||||
|
||||
<span class="doccomment">/// Most of the time, prefer using the faster contraction hierarchies. But sometimes, callers can</span>
|
||||
<span class="doccomment">/// explicitly opt into a slower (but preparation-free) pathfinder that just uses Dijkstra's</span>
|
||||
<span class="doccomment">/// maneuever.</span>
|
||||
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Serialize</span>, <span class="ident">Deserialize</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Pathfinder</span> {
|
||||
<span class="ident">Dijkstra</span>,
|
||||
<span class="ident">CH</span>(<span class="ident">ContractionHierarchyPathfinder</span>),
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Pathfinder</span> {
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">pathfind</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">req</span>: <span class="ident">PathRequest</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Path</span><span class="op">></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">></span> <span class="ident">dijkstra</span>::<span class="ident">simple_pathfind</span>(<span class="kw-2">&</span><span class="ident">req</span>, <span class="ident">map</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">></span> <span class="ident">p</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>, <span class="ident">map</span>),
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">pathfind_avoiding_lanes</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">req</span>: <span class="ident">PathRequest</span>,
|
||||
<span class="ident">avoid</span>: <span class="ident">BTreeSet</span><span class="op"><</span><span class="ident">LaneID</span><span class="op">></span>,
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">Path</span><span class="op">></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="comment">// TODO Consider returning the walking-only path in the failure case, to avoid wasting work</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">should_use_transit</span>(
|
||||
<span class="kw-2">&</span><span class="self">self</span>,
|
||||
<span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>,
|
||||
<span class="ident">start</span>: <span class="ident">Position</span>,
|
||||
<span class="ident">end</span>: <span class="ident">Position</span>,
|
||||
) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Option</span><span class="op"><</span>(<span class="ident">BusStopID</span>, <span class="prelude-ty">Option</span><span class="op"><</span><span class="ident">BusStopID</span><span class="op">></span>, <span class="ident">BusRouteID</span>)<span class="op">></span> {
|
||||
<span class="kw">match</span> <span class="self">self</span> {
|
||||
<span class="comment">// TODO Implement this</span>
|
||||
<span class="ident">Pathfinder</span>::<span class="ident">Dijkstra</span> <span class="op">=</span><span class="op">></span> <span class="prelude-val">None</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">></span> <span class="ident">p</span>.<span class="ident">should_use_transit</span>(<span class="ident">map</span>, <span class="ident">start</span>, <span class="ident">end</span>),
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">apply_edits</span>(<span class="kw-2">&</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&</span><span class="ident">Map</span>, <span class="ident">timer</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">Timer</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">></span> {}
|
||||
<span class="ident">Pathfinder</span>::<span class="ident">CH</span>(<span class="kw-2">ref</span> <span class="kw-2">mut</span> <span class="ident">p</span>) <span class="op">=</span><span class="op">></span> <span class="ident">p</span>.<span class="ident">apply_edits</span>(<span class="ident">map</span>, <span class="ident">timer</span>),
|
||||
}
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "map_model";</script><script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script><script defer src="../../../search-index.js"></script></body></html>
|
Loading…
Reference in New Issue
Block a user