day_16

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Part1

func Part1()

func Part2

func Part2()

Types

type Action

type Action interface{}

type Move

type Move struct {
	ToValve string
}

type Open

type Open struct{}

type Path

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

func (*Path) Clone

func (p *Path) Clone() *Path

func (*Path) String

func (p *Path) String() string

type Rest

type Rest struct{}

type Valve

type Valve struct {
	ID        string
	FlowRate  int
	TunnelsTo []string
	Open      bool
}

func (Valve) HasTunnelTo

func (v Valve) HasTunnelTo(id string) bool

type ValveSet

type ValveSet struct {
	Valves map[string]*Valve
}

func (*ValveSet) AreNeighbours

func (vs *ValveSet) AreNeighbours(t1, t2 string) bool

func (*ValveSet) DistanceBetween

func (vs *ValveSet) DistanceBetween(t1, t2 string) float64

func (*ValveSet) Equal

func (vs *ValveSet) Equal(t1, t2 string) bool

func (*ValveSet) Fitness

func (vs *ValveSet) Fitness(start string, path *Path) int

func (*ValveSet) Nodes

func (vs *ValveSet) Nodes() []string

func (*ValveSet) ShortestPath

func (vs *ValveSet) ShortestPath(from string, to string) ([]string, int)

func (*ValveSet) Valve

func (vs *ValveSet) Valve(id string) *Valve

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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