graph

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0, BSD-2-Clause Imports: 2 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
}

Graph contains nodes and a symbolTable of a graph.

func New

func New(ids []string) *Graph

New returns a graph.

func (*Graph) AddEdge

func (g *Graph) AddEdge(a, b string)

AddEdge adds an edge to the given graph.

func (Graph) Diameter

func (nl Graph) Diameter() int

Diameter is the maximum length of a shortest path in the network

Jump to

Keyboard shortcuts

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