graph

package module
v0.0.0-...-6ccfc7a Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BFS traversalOrder = iota
	DFS
)

Variables

This section is empty.

Functions

func NewGraph

func NewGraph[K cmp.Ordered, T any](list ...*Node[K, T]) *graph[K, T]

Types

type Node

type Node[K cmp.Ordered, T any] struct {
	// contains filtered or unexported fields
}

func NewNode

func NewNode[K cmp.Ordered, T any](key K, data T) *Node[K, T]

func (*Node[K, T]) Data

func (n *Node[K, T]) Data() T

func (*Node[K, T]) Key

func (n *Node[K, T]) Key() K

func (*Node[K, T]) Next

func (n *Node[K, T]) Next() *Node[K, T]

func (*Node[K, T]) String

func (n *Node[K, T]) String() string

Jump to

Keyboard shortcuts

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