day9

package
v0.0.0-...-552ec1b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func A

func A(input *advent.Input) (int, error)

func B

func B(input *advent.Input) (int, error)

Types

type Basin

type Basin mapset.Set

type BasinFinder

type BasinFinder struct {
	// contains filtered or unexported fields
}

func NewBasinFinder

func NewBasinFinder(input *advent.Input) BasinFinder

func (*BasinFinder) FindAll

func (bf *BasinFinder) FindAll()

func (*BasinFinder) FindBasinFrom

func (bf *BasinFinder) FindBasinFrom(pt utils.Point)

FindBasinFrom recursively visits all points in a basin from some starting point

func (*BasinFinder) HasVisited

func (bf *BasinFinder) HasVisited(pt utils.Point) bool

func (*BasinFinder) InBasin

func (bf *BasinFinder) InBasin(pt utils.Point) bool

func (*BasinFinder) Visit

func (bf *BasinFinder) Visit(pt utils.Point)

type HeightMap

type HeightMap [][]int

func (*HeightMap) GetAdjacentPoints

func (m *HeightMap) GetAdjacentPoints(pt utils.Point) []utils.Point

func (*HeightMap) Height

func (m *HeightMap) Height() int

func (*HeightMap) HeightAt

func (m *HeightMap) HeightAt(pt utils.Point) int

func (*HeightMap) IsLowPoint

func (m *HeightMap) IsLowPoint(pt utils.Point) bool

func (*HeightMap) IsOnMap

func (m *HeightMap) IsOnMap(pt utils.Point) bool

func (*HeightMap) RiskLevel

func (m *HeightMap) RiskLevel(pt utils.Point) int

func (*HeightMap) Width

func (m *HeightMap) Width() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL