graph

package
v0.0.0-...-cb72c30 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph[T comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[T comparable]() *Graph[T]

func (*Graph[T]) Add

func (g *Graph[T]) Add(node1 T, node2 T)

func (*Graph[T]) BFS

func (g *Graph[T]) BFS() []T

func (*Graph[T]) DFS

func (g *Graph[T]) DFS() []T

func (*Graph[T]) Remove

func (g *Graph[T]) Remove(node T)

func (*Graph[T]) Str

func (g *Graph[T]) Str() string

Jump to

Keyboard shortcuts

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