pub(crate) struct BlockAxisIndex {
pub(crate) by_y: BTreeMap<CoordY, Vec<usize>>,
pub(crate) by_x: BTreeMap<CoordX, Vec<usize>>,
}Expand description
A per-axis index of the (immutable) block set, so channel seeding iterates only
the blocks that intersect a query coordinate instead of scanning them all. Built
once when the closed geometry is assembled. by_y[y] lists the blocks whose
vertical extent (expanded by one, matching RouterNG::seed_horiz_channel)
contains y; by_x[x] the blocks whose horizontal extent (expanded by one)
contains x. Same coordinate-keyed BTreeMap<Coord, Vec<_>> shape as the
segment maps.
Fields§
§by_y: BTreeMap<CoordY, Vec<usize>>§by_x: BTreeMap<CoordX, Vec<usize>>Implementations§
Trait Implementations§
Source§impl Clone for BlockAxisIndex
impl Clone for BlockAxisIndex
Source§fn clone(&self) -> BlockAxisIndex
fn clone(&self) -> BlockAxisIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockAxisIndex
impl Debug for BlockAxisIndex
Source§impl Default for BlockAxisIndex
impl Default for BlockAxisIndex
Source§fn default() -> BlockAxisIndex
fn default() -> BlockAxisIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BlockAxisIndex
impl RefUnwindSafe for BlockAxisIndex
impl Send for BlockAxisIndex
impl Sync for BlockAxisIndex
impl Unpin for BlockAxisIndex
impl UnsafeUnpin for BlockAxisIndex
impl UnwindSafe for BlockAxisIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more