node

package module
v0.1.7-0...-5cc2dc2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Name       string
	Neighbours map[string]*Node
	Visited    bool
}

func NewNode

func NewNode(n string) *Node

func (*Node) AddNeighbour

func (n *Node) AddNeighbour(to *Node)

func (*Node) Explore

func (n *Node) Explore() []*Node

func (*Node) HasNeighbour

func (n *Node) HasNeighbour(nb *Node) bool

func (*Node) IsEqual

func (n *Node) IsEqual(nb *Node) bool

type Stack

type Stack []*Node

func (Stack) IsEmpty

func (s Stack) IsEmpty() bool

func (Stack) Pop

func (s Stack) Pop() (*Node, Stack)

func (Stack) Push

func (s Stack) Push(n ...*Node) Stack

Jump to

Keyboard shortcuts

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