graph

package
v0.0.0-...-7014987 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 1 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] map[T]set.Set[T]

func NewGraph

func NewGraph[T comparable]() Graph[T]

func (Graph[T]) AddEdge

func (g Graph[T]) AddEdge(from T, to T) bool

func (Graph[T]) AddNode

func (g Graph[T]) AddNode(node T) bool

func (Graph[T]) ContainsEdge

func (g Graph[T]) ContainsEdge(from T, to T) bool

func (Graph[T]) ContainsNode

func (g Graph[T]) ContainsNode(node T) bool

func (Graph[T]) DFS

func (g Graph[T]) DFS(roots []T, visitor func(T) error) error

Jump to

Keyboard shortcuts

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