Documentation
¶
Index ¶
- Variables
- func CreateMatrix(height, width int, ch byte) [][]byte
- func DuplicateBytesMatrix(in [][]byte) [][]byte
- func Int(s string) int
- func IntsToStrings(ints []int) []string
- func Positions(in [][]byte) iter.Seq[Pos]
- func PositionsForHeightWidth(height, width int) iter.Seq[Pos]
- func PositionsValues(in [][]byte) iter.Seq2[Pos, byte]
- func PrintMatrix(in [][]byte)
- func ReadFileIntoBytesMatrix(file io.Reader) ([][]byte, error)
- func RepeatInt(value int, count int) []int
- func ScanFileLineByLine(file io.Reader, cb func(line string)) error
- func StringsToInts(ss []string) []int
- type Direction
- type IntHeap
- type Pos
- type Queue
- type Step
- type StepState
Constants ¶
This section is empty.
Variables ¶
View Source
var ( East = Direction{0, 1} North = Direction{-1, 0} NorthEast = Direction{-1, 1} NorthWest = Direction{-1, -1} South = Direction{1, 0} SouthEast = Direction{1, 1} SouthWest = Direction{1, -1} West = Direction{0, -1} AzimuthDirections = []Direction{North, East, South, West} AllDirections = []Direction{North, NorthEast, East, SouthEast, South, SouthWest, West, NorthWest} SymbolDirectionIdx = map[byte]int{ '^': 0, '>': 1, 'v': 2, '<': 3, } )
Functions ¶
func CreateMatrix ¶
func DuplicateBytesMatrix ¶
func IntsToStrings ¶
func PrintMatrix ¶
func PrintMatrix(in [][]byte)
func StringsToInts ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.