package
0.0.0-20240704130330-202c463ba4d5
Repository: https://github.com/marjamis/advent-of-code.git
Documentation: pkg.go.dev
# Functions
Abs is simple function to return the absolute value of an integer.
Copy2dArray creates a copy of a 2d array.
No description provided by the author
DecimalPositionOf returns a decimal position that a number can be times against to move the decimal position of any number.
No description provided by the author
Provided by: https://siongui.github.io/2017/06/03/go-find-lcm-by-gcd/ greatest common divisor (GCD) via Euclidean algorithm.
GetArrayIndexForValue will loop through an array to find the index that matches the given value.
GetValidAdjacentIndex Quick and dirty function to allow the array to be wrapped around if the adjacentShapeIndex goes above or below the arrays boundaries.
IsLocationValid returns if the provided x,y coordinates are within the range of the provided 2d array.
Provided by: https://siongui.github.io/2017/06/03/go-find-lcm-by-gcd/ find Least Common Multiple (LCM) via GCD.
LoadNodes takes raw data for a graph and converts it into the Nodes map Format of a rawData string separated by the delimiter is "<From><To>[Weight][Directed]" Last two are optional but Directed requires the Weight.
ManhattansDistance return thes Manhattan distance between two points.
Permutations generates all possible combinations from the input data.
ReadIntArray reads from file and returns an []int.
ReadIntArray2d reads from file and returns a [][]int.
ReadIntCSV reads a csv file and return a 2d int array.
ReadRuneArray2d reads from file and returns a [][]rune.
ReadString reads from file and returns a string.
ReadStringArray reads from file and returns a []string.
ReadStringArray2d reads from file and returns a [][]string.
ReadStringCSV reads a csv file and return a 2d int array.
RemoveDuplicates takes a []string array and removes any duplicates strings in that array.
RemoveItemsAtIndexes takes an array of data and an array of indexes, loops through the array to remove those indexes, in a safe way, and returns the remaining elements.
# Structs
Edge contains data about the connection of two Nodes.
No description provided by the author
Node contains details about a specific Node in the graph.
# Interfaces
No description provided by the author
# Type aliases
Nodes a map of Nodes in the graph.