day15

package
v0.0.0-...-173e1c2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grid

type Grid [][]int

func (Grid) Expand

func (g Grid) Expand(n int) Grid

Expand returns a new grid of size x * y * n^2 with copies of itself in the x and y direction n times. All values in the new grid are incremented but are between 1-9

func (Grid) InBounds

func (g Grid) InBounds(p coordinate.Point) bool

func (Grid) Length

func (g Grid) Length() int

func (Grid) Width

func (g Grid) Width() int

type Node

type Node struct {
	coordinate.Point
	Cost int
}

type NodeHeap

type NodeHeap []*Node

An NodeHeap is a min-heap of nodes.

func (NodeHeap) Len

func (h NodeHeap) Len() int

func (NodeHeap) Less

func (h NodeHeap) Less(i, j int) bool

func (*NodeHeap) Pop

func (h *NodeHeap) Pop() interface{}

func (*NodeHeap) Push

func (h *NodeHeap) Push(x interface{})

func (NodeHeap) Swap

func (h NodeHeap) Swap(i, j int)

Jump to

Keyboard shortcuts

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