This commit is contained in:
dabreegster 2022-01-24 10:25:26 +00:00
parent ca96e65662
commit 52348565d8
12 changed files with 101 additions and 229 deletions

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `partition` mod in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, partition"><title>ltn::partition - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module partition</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><div id="sidebar-vars" data-name="partition" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">partition</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ltn/partition.rs.html#1-141" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module partition</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li></ul></div><div id="sidebar-vars" data-name="partition" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">partition</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ltn/partition.rs.html#1-146" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.NeighborhoodID.html" title="ltn::partition::NeighborhoodID struct">NeighborhoodID</a></div><div class="item-right docblock-short"><p>An opaque ID, wont be contiguous as we adjust boundaries</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Partitioning.html" title="ltn::partition::Partitioning struct">Partitioning</a></div><div class="item-right docblock-short"></div></div></div><h2 id="constants" class="small-section-header"><a href="#constants">Constants</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.COLORS.html" title="ltn::partition::COLORS constant">COLORS</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>

View File

@ -1,14 +1,15 @@
<!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 `Partitioning` struct in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, Partitioning"><title>Partitioning in ltn::partition - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Partitioning</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.id_counter">id_counter</a><a href="#structfield.map">map</a><a href="#structfield.neighborhoods">neighborhoods</a><a href="#structfield.single_blocks">single_blocks</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.create_new_neighborhood">create_new_neighborhood</a><a href="#method.empty">empty</a><a href="#method.neighborhood_containing">neighborhood_containing</a><a href="#method.recalculate_coloring">recalculate_coloring</a><a href="#method.seed_using_heuristics">seed_using_heuristics</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">partition</a></h2><div id="sidebar-vars" data-name="Partitioning" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">ltn</a>::<wbr><a href="index.html">partition</a>::<wbr><a class="struct" href="#">Partitioning</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ltn/partition.rs.html#27-34" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Partitioning {
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Partitioning</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.id_counter">id_counter</a><a href="#structfield.map">map</a><a href="#structfield.neighborhoods">neighborhoods</a><a href="#structfield.single_blocks">single_blocks</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.create_new_neighborhood">create_new_neighborhood</a><a href="#method.empty">empty</a><a href="#method.neighborhood_containing">neighborhood_containing</a><a href="#method.recalculate_coloring">recalculate_coloring</a><a href="#method.remove_new_neighborhood">remove_new_neighborhood</a><a href="#method.seed_using_heuristics">seed_using_heuristics</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">partition</a></h2><div id="sidebar-vars" data-name="Partitioning" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">ltn</a>::<wbr><a href="index.html">partition</a>::<wbr><a class="struct" href="#">Partitioning</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ltn/partition.rs.html#27-34" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Partitioning {
pub map: <a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a>,
pub neighborhoods: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>, Color<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>&gt;,
pub single_blocks: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;,
id_counter: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a>,
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a></code></span><span id="structfield.neighborhoods" class="structfield small-section-header"><a href="#structfield.neighborhoods" class="anchor field"></a><code>neighborhoods: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>, Color<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>&gt;</code></span><span id="structfield.single_blocks" class="structfield small-section-header"><a href="#structfield.single_blocks" class="anchor field"></a><code>single_blocks: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;</code></span><span id="structfield.id_counter" class="structfield small-section-header"><a href="#structfield.id_counter" class="anchor field"></a><code>id_counter: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#36-141" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.empty" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#38-46" title="goto source code">[src]</a></div><a href="#method.empty" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.empty" class="fnname">empty</a>() -&gt; <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h4></div></summary><div class="docblock"><p>Only valid before the LTN tool has been activated this session</p>
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="../../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a></code></span><span id="structfield.neighborhoods" class="structfield small-section-header"><a href="#structfield.neighborhoods" class="anchor field"></a><code>neighborhoods: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>, Color<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>&gt;</code></span><span id="structfield.single_blocks" class="structfield small-section-header"><a href="#structfield.single_blocks" class="anchor field"></a><code>single_blocks: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;</code></span><span id="structfield.id_counter" class="structfield small-section-header"><a href="#structfield.id_counter" class="anchor field"></a><code>id_counter: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#36-146" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.empty" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#38-46" title="goto source code">[src]</a></div><a href="#method.empty" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.empty" class="fnname">empty</a>() -&gt; <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h4></div></summary><div class="docblock"><p>Only valid before the LTN tool has been activated this session</p>
</div></details><div id="method.seed_using_heuristics" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#48-102" title="goto source code">[src]</a></div><a href="#method.seed_using_heuristics" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.seed_using_heuristics" class="fnname">seed_using_heuristics</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../struct.Session.html" title="struct ltn::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.recalculate_coloring" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#105-119" title="goto source code">[src]</a></div><a href="#method.recalculate_coloring" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.recalculate_coloring" class="fnname">recalculate_coloring</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>True if the coloring changed</p>
</div></details><div id="method.neighborhood_containing" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#121-129" title="goto source code">[src]</a></div><a href="#method.neighborhood_containing" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.neighborhood_containing" class="fnname">neighborhood_containing</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;find_block: &amp;<a class="struct" href="../../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a>&gt;</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.create_new_neighborhood" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#134-140" title="goto source code">[src]</a></div><a href="#method.create_new_neighborhood" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.create_new_neighborhood" class="fnname">create_new_neighborhood</a>(&amp;mut self, block: <a class="struct" href="../../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>) -&gt; <a class="struct" href="struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a></h4></div></summary><div class="docblock"><p>Starts a new neighborhood containing a single block. This will temporarily leave the
Partitioning in an invalid state, with one block being part of two neighborhoods. The
caller must keep rearranging things.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.remove_new_neighborhood" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#143-145" title="goto source code">[src]</a></div><a href="#method.remove_new_neighborhood" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.remove_new_neighborhood" class="fnname">remove_new_neighborhood</a>(&amp;mut self, id: <a class="struct" href="struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a>)</h4></div></summary><div class="docblock"><p>Undo the above. Lots of trust on the caller.</p>
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#26" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/ltn/partition.rs.html#26" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&amp;</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

View File

@ -1,3 +1,3 @@
<!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 `calculate_frontier` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, calculate_frontier"><title>calculate_frontier in ltn::select_boundary - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">select_boundary</a></h2><div id="sidebar-vars" data-name="calculate_frontier" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">select_boundary</a>::<wbr><a class="fn" href="#">calculate_frontier</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ltn/select_boundary.rs.html#541-556" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn calculate_frontier(<br>&nbsp;&nbsp;&nbsp;&nbsp;perim: &amp;<a class="struct" href="../../map_model/objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;blocks: &amp;<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="struct.BlockID.html" title="struct ltn::select_boundary::BlockID">BlockID</a>, <a class="struct" href="../../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="struct.BlockID.html" title="struct ltn::select_boundary::BlockID">BlockID</a>&gt;</code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">select_boundary</a></h2><div id="sidebar-vars" data-name="calculate_frontier" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">select_boundary</a>::<wbr><a class="fn" href="#">calculate_frontier</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ltn/select_boundary.rs.html#471-486" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn calculate_frontier(<br>&nbsp;&nbsp;&nbsp;&nbsp;perim: &amp;<a class="struct" href="../../map_model/objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;blocks: &amp;<a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="struct.BlockID.html" title="struct ltn::select_boundary::BlockID">BlockID</a>, <a class="struct" href="../../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="struct.BlockID.html" title="struct ltn::select_boundary::BlockID">BlockID</a>&gt;</code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
</body></html>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make_panel` fn in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, make_panel"><title>make_panel in ltn::select_boundary - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">select_boundary</a></h2><div id="sidebar-vars" data-name="make_panel" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">select_boundary</a>::<wbr><a class="fn" href="#">make_panel</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ltn/select_boundary.rs.html#499-538" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn make_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../struct.Session.html" title="struct ltn::Session">Session</a>&gt;) -&gt; Panel</code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">ltn</a>::<wbr><a href="index.html">select_boundary</a></h2><div id="sidebar-vars" data-name="make_panel" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">select_boundary</a>::<wbr><a class="fn" href="#">make_panel</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ltn/select_boundary.rs.html#429-468" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>fn make_panel(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="../struct.Session.html" title="struct ltn::Session">Session</a>&gt;) -&gt; Panel</code></pre></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
</body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `select_boundary` mod in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, select_boundary"><title>ltn::select_boundary - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><script defer src="../../main.js"></script>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module select_boundary</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="select_boundary" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">select_boundary</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ltn/select_boundary.rs.html#1-556" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
<noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../ltn/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module select_boundary</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="select_boundary" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">select_boundary</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/ltn/select_boundary.rs.html#1-486" title="goto source code">[src]</a></span></h1><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.BlockID.html" title="ltn::select_boundary::BlockID struct">BlockID</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.SelectBoundary.html" title="ltn::select_boundary::SelectBoundary struct">SelectBoundary</a></div><div class="item-right docblock-short"></div></div></div><h2 id="constants" class="small-section-header"><a href="#constants">Constants</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.SELECTED.html" title="ltn::select_boundary::SELECTED constant">SELECTED</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.calculate_frontier.html" title="ltn::select_boundary::calculate_frontier fn">calculate_frontier</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.make_panel.html" title="ltn::select_boundary::make_panel fn">make_panel</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,15 @@
<!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 `Partitioning` struct in crate `ltn`."><meta name="keywords" content="rust, rustlang, rust-lang, Partitioning"><title>Partitioning in ltn - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../ltn/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Partitioning</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.id_counter">id_counter</a><a href="#structfield.map">map</a><a href="#structfield.neighborhoods">neighborhoods</a><a href="#structfield.single_blocks">single_blocks</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.create_new_neighborhood">create_new_neighborhood</a><a href="#method.empty">empty</a><a href="#method.neighborhood_containing">neighborhood_containing</a><a href="#method.recalculate_coloring">recalculate_coloring</a><a href="#method.seed_using_heuristics">seed_using_heuristics</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="Partitioning" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">ltn</a>::<wbr><a class="struct" href="#">Partitioning</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/ltn/partition.rs.html#27-34" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Partitioning {
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../ltn/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Partitioning</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.id_counter">id_counter</a><a href="#structfield.map">map</a><a href="#structfield.neighborhoods">neighborhoods</a><a href="#structfield.single_blocks">single_blocks</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.create_new_neighborhood">create_new_neighborhood</a><a href="#method.empty">empty</a><a href="#method.neighborhood_containing">neighborhood_containing</a><a href="#method.recalculate_coloring">recalculate_coloring</a><a href="#method.remove_new_neighborhood">remove_new_neighborhood</a><a href="#method.seed_using_heuristics">seed_using_heuristics</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Clone">Clone</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="Partitioning" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="index.html">ltn</a>::<wbr><a class="struct" href="#">Partitioning</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/ltn/partition.rs.html#27-34" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust struct"><code>pub struct Partitioning {
pub map: <a class="struct" href="../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a>,
pub neighborhoods: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="partition/struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>, Color<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>&gt;,
pub single_blocks: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;,
id_counter: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a>,
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a></code></span><span id="structfield.neighborhoods" class="structfield small-section-header"><a href="#structfield.neighborhoods" class="anchor field"></a><code>neighborhoods: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="partition/struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>, Color<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>&gt;</code></span><span id="structfield.single_blocks" class="structfield small-section-header"><a href="#structfield.single_blocks" class="anchor field"></a><code>single_blocks: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;</code></span><span id="structfield.id_counter" class="structfield small-section-header"><a href="#structfield.id_counter" class="anchor field"></a><code>id_counter: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#36-141" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.empty" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#38-46" title="goto source code">[src]</a></div><a href="#method.empty" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.empty" class="fnname">empty</a>() -&gt; <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h4></div></summary><div class="docblock"><p>Only valid before the LTN tool has been activated this session</p>
}</code></pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.map" class="structfield small-section-header"><a href="#structfield.map" class="anchor field"></a><code>map: <a class="struct" href="../abstio/abst_paths/struct.MapName.html" title="struct abstio::abst_paths::MapName">MapName</a></code></span><span id="structfield.neighborhoods" class="structfield small-section-header"><a href="#structfield.neighborhoods" class="anchor field"></a><code>neighborhoods: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="partition/struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a>, <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">(</a><a class="struct" href="../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>, Color<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.tuple.html">)</a>&gt;</code></span><span id="structfield.single_blocks" class="structfield small-section-header"><a href="#structfield.single_blocks" class="anchor field"></a><code>single_blocks: <a class="struct" href="https://doc.rust-lang.org/1.58.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>&gt;</code></span><span id="structfield.id_counter" class="structfield small-section-header"><a href="#structfield.id_counter" class="anchor field"></a><code>id_counter: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.usize.html">usize</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#36-146" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.empty" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#38-46" title="goto source code">[src]</a></div><a href="#method.empty" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.empty" class="fnname">empty</a>() -&gt; <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h4></div></summary><div class="docblock"><p>Only valid before the LTN tool has been activated this session</p>
</div></details><div id="method.seed_using_heuristics" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#48-102" title="goto source code">[src]</a></div><a href="#method.seed_using_heuristics" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.seed_using_heuristics" class="fnname">seed_using_heuristics</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="struct" href="struct.Session.html" title="struct ltn::Session">Session</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.recalculate_coloring" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#105-119" title="goto source code">[src]</a></div><a href="#method.recalculate_coloring" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.recalculate_coloring" class="fnname">recalculate_coloring</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>True if the coloring changed</p>
</div></details><div id="method.neighborhood_containing" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#121-129" title="goto source code">[src]</a></div><a href="#method.neighborhood_containing" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.neighborhood_containing" class="fnname">neighborhood_containing</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;find_block: &amp;<a class="struct" href="../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.58.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="partition/struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a>&gt;</h4></div><details class="rustdoc-toggle method-toggle" open><summary><div id="method.create_new_neighborhood" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#134-140" title="goto source code">[src]</a></div><a href="#method.create_new_neighborhood" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.create_new_neighborhood" class="fnname">create_new_neighborhood</a>(&amp;mut self, block: <a class="struct" href="../map_model/objects/block/struct.Block.html" title="struct map_model::objects::block::Block">Block</a>) -&gt; <a class="struct" href="partition/struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a></h4></div></summary><div class="docblock"><p>Starts a new neighborhood containing a single block. This will temporarily leave the
Partitioning in an invalid state, with one block being part of two neighborhoods. The
caller must keep rearranging things.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.remove_new_neighborhood" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#143-145" title="goto source code">[src]</a></div><a href="#method.remove_new_neighborhood" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.remove_new_neighborhood" class="fnname">remove_new_neighborhood</a>(&amp;mut self, id: <a class="struct" href="partition/struct.NeighborhoodID.html" title="struct ltn::partition::NeighborhoodID">NeighborhoodID</a>)</h4></div></summary><div class="docblock"><p>Undo the above. Lots of trust on the caller.</p>
</div></details></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Clone" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#26" title="goto source code">[src]</a></div><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/ltn/partition.rs.html#26" title="goto source code">[src]</a></div><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h4></div></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.clone_from" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/clone.rs.html#130" title="goto source code">[src]</a></div><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.reference.html">&amp;</a>Self)</h4></div></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.58.1/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="partition/struct.Partitioning.html" title="struct ltn::partition::Partitioning">Partitioning</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.58.1/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.58.1/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.58.1/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.58.1/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

View File

@ -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="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../../storage.js"></script><script src="../../../../crates.js"></script><script defer src="../../../../main.js"></script>
<noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-c32b77646ab1d63c/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.str.html">str</a> = r&quot;Mon, 24 Jan 2022 09:48:08 +0000&quot;;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
<noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../../src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-c32b77646ab1d63c/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.58.1/std/primitive.str.html">str</a> = r&quot;Mon, 24 Jan 2022 10:24:17 +0000&quot;;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="map_gui" data-search-index-js="../../../../search-index.js" data-search-js="../../../../search.js"></div>
</body></html>

File diff suppressed because one or more lines are too long

View File

@ -140,6 +140,11 @@
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections::BTreeMap</span>;
<span class="kw">use</span> <span class="ident">abstio::MapName</span>;
@ -280,6 +285,11 @@
<span class="self">self</span>.<span class="ident">neighborhoods</span>.<span class="ident">insert</span>(<span class="ident">id</span>, (<span class="ident">block</span>, <span class="ident">Color::RED</span>));
<span class="ident">id</span>
}
<span class="doccomment">/// Undo the above. Lots of trust on the caller.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">remove_new_neighborhood</span>(<span class="kw-2">&amp;mut</span> <span class="self">self</span>, <span class="ident">id</span>: <span class="ident">NeighborhoodID</span>) {
<span class="self">self</span>.<span class="ident">neighborhoods</span>.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">id</span>).<span class="ident">unwrap</span>();
}
}
</code></pre></div>
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>

View File

@ -485,76 +485,6 @@
<span id="484">484</span>
<span id="485">485</span>
<span id="486">486</span>
<span id="487">487</span>
<span id="488">488</span>
<span id="489">489</span>
<span id="490">490</span>
<span id="491">491</span>
<span id="492">492</span>
<span id="493">493</span>
<span id="494">494</span>
<span id="495">495</span>
<span id="496">496</span>
<span id="497">497</span>
<span id="498">498</span>
<span id="499">499</span>
<span id="500">500</span>
<span id="501">501</span>
<span id="502">502</span>
<span id="503">503</span>
<span id="504">504</span>
<span id="505">505</span>
<span id="506">506</span>
<span id="507">507</span>
<span id="508">508</span>
<span id="509">509</span>
<span id="510">510</span>
<span id="511">511</span>
<span id="512">512</span>
<span id="513">513</span>
<span id="514">514</span>
<span id="515">515</span>
<span id="516">516</span>
<span id="517">517</span>
<span id="518">518</span>
<span id="519">519</span>
<span id="520">520</span>
<span id="521">521</span>
<span id="522">522</span>
<span id="523">523</span>
<span id="524">524</span>
<span id="525">525</span>
<span id="526">526</span>
<span id="527">527</span>
<span id="528">528</span>
<span id="529">529</span>
<span id="530">530</span>
<span id="531">531</span>
<span id="532">532</span>
<span id="533">533</span>
<span id="534">534</span>
<span id="535">535</span>
<span id="536">536</span>
<span id="537">537</span>
<span id="538">538</span>
<span id="539">539</span>
<span id="540">540</span>
<span id="541">541</span>
<span id="542">542</span>
<span id="543">543</span>
<span id="544">544</span>
<span id="545">545</span>
<span id="546">546</span>
<span id="547">547</span>
<span id="548">548</span>
<span id="549">549</span>
<span id="550">550</span>
<span id="551">551</span>
<span id="552">552</span>
<span id="553">553</span>
<span id="554">554</span>
<span id="555">555</span>
<span id="556">556</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">BTreeSet</span>};
<span class="kw">use</span> <span class="ident">anyhow::Result</span>;
@ -783,55 +713,8 @@
.<span class="ident">partitioning</span>
.<span class="ident">neighborhood_containing</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">blocks</span>[<span class="kw-2">&amp;</span><span class="ident">id</span>])
.<span class="ident">unwrap</span>();
<span class="macro">assert_ne!</span>(<span class="ident">old_owner</span>, <span class="self">self</span>.<span class="ident">id</span>);
<span class="comment">// Is the newly expanded neighborhood a valid perimeter?</span>
<span class="kw">let</span> <span class="ident">current_neighborhood_block</span> <span class="op">=</span>
<span class="self">self</span>.<span class="ident">make_merged_block</span>(<span class="ident">app</span>, <span class="self">self</span>.<span class="ident">selected</span>.<span class="ident">iter</span>().<span class="ident">cloned</span>().<span class="ident">collect</span>())<span class="question-mark">?</span>;
<span class="comment">// Is the old owner neighborhood, minus this block, still valid?</span>
<span class="kw">let</span> <span class="ident">old_blocks</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">BlockID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="self">self</span>
.<span class="ident">block_to_neighborhood</span>
.<span class="ident">iter</span>()
.<span class="ident">filter_map</span>(<span class="op">|</span>(<span class="ident">block</span>, <span class="ident">neighborhood</span>)<span class="op">|</span> {
<span class="kw">if</span> <span class="kw-2">*</span><span class="ident">block</span> <span class="op">!</span><span class="op">=</span> <span class="ident">id</span> <span class="op">&amp;&amp;</span> <span class="kw-2">*</span><span class="ident">neighborhood</span> <span class="op">==</span> <span class="ident">old_owner</span> {
<span class="prelude-val">Some</span>(<span class="kw-2">*</span><span class="ident">block</span>)
} <span class="kw">else</span> {
<span class="prelude-val">None</span>
}
})
.<span class="ident">collect</span>();
<span class="kw">if</span> <span class="ident">old_blocks</span>.<span class="ident">is_empty</span>() {
<span class="comment">// The old neighborhood is destroyed!</span>
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">id</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">current_neighborhood_block</span>;
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">old_owner</span>)
.<span class="ident">unwrap</span>();
} <span class="kw">else</span> {
<span class="kw">let</span> <span class="ident">old_neighborhood_block</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">make_merged_block</span>(<span class="ident">app</span>, <span class="ident">old_blocks</span>)<span class="question-mark">?</span>;
<span class="comment">// Great! Do the transfer.</span>
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">id</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">current_neighborhood_block</span>;
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="ident">old_owner</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">old_neighborhood_block</span>;
}
<span class="self">self</span>.<span class="ident">block_to_neighborhood</span>.<span class="ident">insert</span>(<span class="ident">id</span>, <span class="self">self</span>.<span class="ident">id</span>);
<span class="comment">// Ignore the return value if the old neighborhood is deleted</span>
<span class="self">self</span>.<span class="ident">transfer_block</span>(<span class="ident">app</span>, <span class="ident">id</span>, <span class="ident">old_owner</span>, <span class="self">self</span>.<span class="ident">id</span>)<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="prelude-val">None</span>)
}
@ -867,66 +750,7 @@
.<span class="ident">find</span>(<span class="op">|</span>(<span class="kw">_</span>, (<span class="ident">block</span>, <span class="kw">_</span>))<span class="op">|</span> <span class="ident">block</span>.<span class="ident">perimeter</span>.<span class="ident">roads</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">other_side</span>))
{
<span class="kw">let</span> <span class="ident">new_owner</span> <span class="op">=</span> <span class="kw-2">*</span><span class="ident">new_owner</span>;
<span class="comment">// Great, donor found!</span>
<span class="macro">assert_ne!</span>(<span class="ident">new_owner</span>, <span class="self">self</span>.<span class="ident">id</span>);
<span class="comment">// TODO Refactor... fn transfer_block(&amp;mut self, app: &amp;mut App, id: BlockID, old_owner: NeighborhoodID, new_owner: NeighborhoodID) -&gt; Result&lt;()&gt;</span>
<span class="comment">// Is the newly expanded neighborhood a valid perimeter?</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">new_owner_blocks</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">BlockID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="self">self</span>
.<span class="ident">block_to_neighborhood</span>
.<span class="ident">iter</span>()
.<span class="ident">filter_map</span>(<span class="op">|</span>(<span class="ident">block</span>, <span class="ident">neighborhood</span>)<span class="op">|</span> {
<span class="kw">if</span> <span class="kw-2">*</span><span class="ident">neighborhood</span> <span class="op">==</span> <span class="ident">new_owner</span> {
<span class="prelude-val">Some</span>(<span class="kw-2">*</span><span class="ident">block</span>)
} <span class="kw">else</span> {
<span class="prelude-val">None</span>
}
})
.<span class="ident">collect</span>();
<span class="ident">new_owner_blocks</span>.<span class="ident">push</span>(<span class="ident">id</span>);
<span class="kw">let</span> <span class="ident">new_neighborhood_block</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">make_merged_block</span>(<span class="ident">app</span>, <span class="ident">new_owner_blocks</span>)<span class="question-mark">?</span>;
<span class="comment">// Is the current neighborhood, minus this block, still valid?</span>
<span class="kw">let</span> <span class="ident">old_owner_blocks</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">BlockID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="self">self</span>
.<span class="ident">selected</span>
.<span class="ident">iter</span>()
.<span class="ident">filter_map</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="kw">if</span> <span class="kw-2">*</span><span class="ident">x</span> <span class="op">!</span><span class="op">=</span> <span class="ident">id</span> { <span class="prelude-val">Some</span>(<span class="kw-2">*</span><span class="ident">x</span>) } <span class="kw">else</span> { <span class="prelude-val">None</span> })
.<span class="ident">collect</span>();
<span class="kw">if</span> <span class="ident">old_owner_blocks</span>.<span class="ident">is_empty</span>() {
<span class="comment">// We&#39;re deleting the current neighborhood!</span>
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="ident">new_owner</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">new_neighborhood_block</span>;
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">id</span>)
.<span class="ident">unwrap</span>();
<span class="comment">// Tell the caller to recreate this SelectBoundary state, switching to the</span>
<span class="comment">// neighborhood we just donated to, since this one is now gone</span>
<span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(<span class="ident">new_owner</span>));
}
<span class="kw">let</span> <span class="ident">old_neighborhood_block</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">make_merged_block</span>(<span class="ident">app</span>, <span class="ident">old_owner_blocks</span>)<span class="question-mark">?</span>;
<span class="comment">// Great! Do the transfer.</span>
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">id</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">old_neighborhood_block</span>;
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="ident">new_owner</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">new_neighborhood_block</span>;
<span class="self">self</span>.<span class="ident">block_to_neighborhood</span>.<span class="ident">insert</span>(<span class="ident">id</span>, <span class="ident">new_owner</span>);
<span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="prelude-val">None</span>);
<span class="kw">return</span> <span class="self">self</span>.<span class="ident">transfer_block</span>(<span class="ident">app</span>, <span class="ident">id</span>, <span class="self">self</span>.<span class="ident">id</span>, <span class="ident">new_owner</span>);
}
}
@ -936,52 +760,88 @@
.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">create_new_neighborhood</span>(<span class="self">self</span>.<span class="ident">blocks</span>[<span class="kw-2">&amp;</span><span class="ident">id</span>].<span class="ident">clone</span>());
<span class="comment">// TODO Duplicate code below</span>
{
<span class="kw">let</span> <span class="ident">new_neighborhood_block</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">blocks</span>[<span class="kw-2">&amp;</span><span class="ident">id</span>].<span class="ident">clone</span>();
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">transfer_block</span>(<span class="ident">app</span>, <span class="ident">id</span>, <span class="self">self</span>.<span class="ident">id</span>, <span class="ident">new_owner</span>);
<span class="kw">if</span> <span class="ident">result</span>.<span class="ident">is_err</span>() {
<span class="comment">// Revert the change above!</span>
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">partitioning</span>.<span class="ident">remove_new_neighborhood</span>(<span class="ident">new_owner</span>);
}
<span class="ident">result</span>
}
<span class="comment">// Is the current neighborhood, minus this block, still valid?</span>
<span class="kw">let</span> <span class="ident">old_owner_blocks</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">BlockID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="self">self</span>
.<span class="ident">selected</span>
.<span class="ident">iter</span>()
.<span class="ident">filter_map</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="kw">if</span> <span class="kw-2">*</span><span class="ident">x</span> <span class="op">!</span><span class="op">=</span> <span class="ident">id</span> { <span class="prelude-val">Some</span>(<span class="kw-2">*</span><span class="ident">x</span>) } <span class="kw">else</span> { <span class="prelude-val">None</span> })
.<span class="ident">collect</span>();
<span class="kw">if</span> <span class="ident">old_owner_blocks</span>.<span class="ident">is_empty</span>() {
<span class="comment">// We&#39;re deleting the current neighborhood!</span>
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="ident">new_owner</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">new_neighborhood_block</span>;
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">id</span>)
.<span class="ident">unwrap</span>();
<span class="comment">// Tell the caller to recreate this SelectBoundary state, switching to the</span>
<span class="comment">// neighborhood we just donated to, since this one is now gone</span>
<span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(<span class="ident">new_owner</span>));
}
<span class="comment">// This doesn&#39;t use self.selected; it&#39;s agnostic to what the current block is</span>
<span class="comment">// TODO Move it to Partitioning</span>
<span class="kw">fn</span> <span class="ident">transfer_block</span>(
<span class="kw-2">&amp;mut</span> <span class="self">self</span>,
<span class="ident">app</span>: <span class="kw-2">&amp;mut</span> <span class="ident">App</span>,
<span class="ident">id</span>: <span class="ident">BlockID</span>,
<span class="ident">old_owner</span>: <span class="ident">NeighborhoodID</span>,
<span class="ident">new_owner</span>: <span class="ident">NeighborhoodID</span>,
) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">NeighborhoodID</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="macro">assert_ne!</span>(<span class="ident">old_owner</span>, <span class="ident">new_owner</span>);
<span class="kw">let</span> <span class="ident">old_neighborhood_block</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">make_merged_block</span>(<span class="ident">app</span>, <span class="ident">old_owner_blocks</span>)<span class="question-mark">?</span>;
<span class="comment">// Great! Do the transfer.</span>
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">id</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">old_neighborhood_block</span>;
<span class="comment">// Is the newly expanded neighborhood a valid perimeter?</span>
<span class="kw">let</span> <span class="ident">new_owner_blocks</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">BlockID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="self">self</span>
.<span class="ident">block_to_neighborhood</span>
.<span class="ident">iter</span>()
.<span class="ident">filter_map</span>(<span class="op">|</span>(<span class="ident">block</span>, <span class="ident">neighborhood</span>)<span class="op">|</span> {
<span class="kw">if</span> <span class="kw-2">*</span><span class="ident">neighborhood</span> <span class="op">==</span> <span class="ident">new_owner</span> <span class="op">|</span><span class="op">|</span> <span class="kw-2">*</span><span class="ident">block</span> <span class="op">==</span> <span class="ident">id</span> {
<span class="prelude-val">Some</span>(<span class="kw-2">*</span><span class="ident">block</span>)
} <span class="kw">else</span> {
<span class="prelude-val">None</span>
}
})
.<span class="ident">collect</span>();
<span class="kw">let</span> <span class="ident">new_neighborhood_block</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">make_merged_block</span>(<span class="ident">app</span>, <span class="ident">new_owner_blocks</span>)<span class="question-mark">?</span>;
<span class="comment">// Is the old neighborhood, minus this block, still valid?</span>
<span class="comment">// TODO refactor Neighborhood to BlockIDs?</span>
<span class="kw">let</span> <span class="ident">old_owner_blocks</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">BlockID</span><span class="op">&gt;</span> <span class="op">=</span> <span class="self">self</span>
.<span class="ident">block_to_neighborhood</span>
.<span class="ident">iter</span>()
.<span class="ident">filter_map</span>(<span class="op">|</span>(<span class="ident">block</span>, <span class="ident">neighborhood</span>)<span class="op">|</span> {
<span class="kw">if</span> <span class="kw-2">*</span><span class="ident">neighborhood</span> <span class="op">==</span> <span class="ident">old_owner</span> <span class="op">&amp;&amp;</span> <span class="kw-2">*</span><span class="ident">block</span> <span class="op">!</span><span class="op">=</span> <span class="ident">id</span> {
<span class="prelude-val">Some</span>(<span class="kw-2">*</span><span class="ident">block</span>)
} <span class="kw">else</span> {
<span class="prelude-val">None</span>
}
})
.<span class="ident">collect</span>();
<span class="kw">if</span> <span class="ident">old_owner_blocks</span>.<span class="ident">is_empty</span>() {
<span class="comment">// We&#39;re deleting the old neighborhood!</span>
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="ident">new_owner</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">new_neighborhood_block</span>;
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">remove</span>(<span class="kw-2">&amp;</span><span class="ident">old_owner</span>)
.<span class="ident">unwrap</span>();
<span class="self">self</span>.<span class="ident">block_to_neighborhood</span>.<span class="ident">insert</span>(<span class="ident">id</span>, <span class="ident">new_owner</span>);
<span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="prelude-val">None</span>);
<span class="comment">// Tell the caller to recreate this SelectBoundary state, switching to the neighborhood</span>
<span class="comment">// we just donated to, since the old is now gone</span>
<span class="kw">return</span> <span class="prelude-val">Ok</span>(<span class="prelude-val">Some</span>(<span class="ident">new_owner</span>));
}
<span class="kw">let</span> <span class="ident">old_neighborhood_block</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">make_merged_block</span>(<span class="ident">app</span>, <span class="ident">old_owner_blocks</span>)<span class="question-mark">?</span>;
<span class="comment">// Great! Do the transfer.</span>
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="ident">old_owner</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">old_neighborhood_block</span>;
<span class="ident">app</span>.<span class="ident">session</span>
.<span class="ident">partitioning</span>
.<span class="ident">neighborhoods</span>
.<span class="ident">get_mut</span>(<span class="kw-2">&amp;</span><span class="ident">new_owner</span>)
.<span class="ident">unwrap</span>()
.<span class="number">0</span> <span class="op">=</span> <span class="ident">new_neighborhood_block</span>;
<span class="self">self</span>.<span class="ident">block_to_neighborhood</span>.<span class="ident">insert</span>(<span class="ident">id</span>, <span class="ident">new_owner</span>);
<span class="prelude-val">Ok</span>(<span class="prelude-val">None</span>)
}
}

View File

@ -175,7 +175,7 @@
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;rustdoc 1.58.1 (db9d1b20b 2022-01-20)&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Mon, 24 Jan 2022 09:48:08 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Mon, 24 Jan 2022 10:24:17 +0000&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;x86_64&quot;</span>;