struct Maze {
initial: State,
masks: [u32; 30],
minimum: [u32; 30],
matrix: [[Door; 30]; 30],
}Expand description
initial is the complete set of keys that we need to collect. Will always be binary
11111111111111111111111111 for the real input but fewer for sample data.
masks maps the set of keys in the same quadrant, for prefiltering in part 2.
minimum is the smallest distance from a key to any of its neighbors, for the part1 heuristic.
matrix is the adjacency of distances and doors between each pair of keys and the robots’
starting locations.
Fields§
§initial: State§masks: [u32; 30]§minimum: [u32; 30]§matrix: [[Door; 30]; 30]Auto Trait Implementations§
impl Freeze for Maze
impl RefUnwindSafe for Maze
impl Send for Maze
impl Sync for Maze
impl Unpin for Maze
impl UnsafeUnpin for Maze
impl UnwindSafe for Maze
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