Crate aochelpers

Source

Structs§

Coordinate
A standard 2D Cartesian Coordinate
Coordinate3d
Standard 3D Cartesian Coordinate
Cuboid
Describes a cuboid aligned with the x,y,z axes by way of its top left back and bottom right front corners
Grid
Representation of a grid of objects which can be accessed by Coordinate Suited to dense grids of objects such as word search puzzles Less suited to sparse grids as empoty points are stored
Label
Convenience-based struct converting typical AoC node labels consisting of numbers and letters to a numeric representation, saveing all that tedious mucking about with lifetimes.
Particle
Representation of a point moving in a direction
Rectangle
Describes a rectangle aligned with the x,y,z axes by way of its top left and bottom right corners
ScoredItem
Generic struct used to select an item based on a minimum score. Use with std::collections::BinaryHeap for problems requiring Djikstra’s Algorithm or A*

Enums§

Direction
Compass directions

Traits§

Heading
Defines a direction used by a Particle. May be either a compass Direction or an i32 bearing.

Functions§

gcd
Returns the greatest common divisor of two numbers
get_daily_input
Retrieves and caches a day’s input, returning it as a string
get_everybodycodes_input
Takes an Everybody Codes input from the local Downloads folder if unavailable in the cache. In the future this may be expanded to download inputs directly.
lcm
Returns the lowest common multiple of two numbers
parse_number_grid
Parses a grid of digits in the form of a string to a HashMap<Coordinate, V>