graph

package
v0.0.0-...-1d71295 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 0 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 {
	Nodes map[string]struct{}
	Edges map[string]map[string]struct{}
}

Graph base struct

func NewGraph

func NewGraph() *Graph

NewGraph Create graph.

func (*Graph) AddEdge

func (g *Graph) AddEdge(u, v string)

AddEdge Add an edge from u to v.

func (*Graph) AddNode

func (g *Graph) AddNode(id string) bool

AddNode Add node id to graph, return true if added (string's are unique).

Jump to

Keyboard shortcuts

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