graph

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: BSD-3-Clause 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 struct {
	// contains filtered or unexported fields
}

func New

func New() *Graph

func (*Graph) AddTransition

func (g *Graph) AddTransition(from int, to int)

func (*Graph) Info

func (g *Graph) Info() Info

func (*Graph) IsTerminal

func (g *Graph) IsTerminal(node int) bool

func (*Graph) IsValid

func (g *Graph) IsValid(node int) bool

func (*Graph) Nodes added in v0.2.0

func (g *Graph) Nodes() []int

func (*Graph) Transitions

func (g *Graph) Transitions(node int) []int

type Info

type Info struct {
	StartingNodes []int
	TerminalNodes []int
	Transitions   []Transition
}

type Transition

type Transition struct {
	From int
	To   int
}

Jump to

Keyboard shortcuts

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