#advent #coordinate #methods #algorithm #direction #problem #solving

aochelpers

A set of structs and associated methods that cover common use=cases when solving Advent Of Code problems

22 releases

0.8.3 Dec 12, 2024
0.7.1 Nov 29, 2024
0.6.1 Dec 27, 2023
0.3.2 Nov 27, 2023

#518 in Algorithms

Download history 2/week @ 2024-09-17 18/week @ 2024-09-24 3/week @ 2024-10-08 4/week @ 2024-10-15 127/week @ 2024-11-05 4/week @ 2024-11-12 9/week @ 2024-11-19 230/week @ 2024-11-26 389/week @ 2024-12-03 187/week @ 2024-12-10 11/week @ 2024-12-17

817 downloads per month

Apache-2.0

34KB
601 lines

Advent Of Code Helpers

Various structs and associated methods which may come in useful when solving Advent of Code challenges:

  • Direction - Compass Direction
  • Coordinate - Standard 2D Cartesian Coordinate
  • Particle - Location with compass direction
  • Rectangle - Pair of Coordinates describing a rectangle
  • Coordinate3d - Standard 3D Cartesian Coordinate
  • Cuboid - Pair of 3D Coordinates describing a cuboid
  • ScoredItem - Used with std::collections::BinaryHeap to implement A* or Djikstra's algorithms
  • get_daily_input() - fetches and caches the input for a given day's puzzle
  • parse_number_grid<T>() - converts a grid of 0-9 digits to a HashMap<Coordinate, T>

Dependencies

~7–18MB
~242K SLoC