graph

package
v0.0.0-...-140d8b8 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 4 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 {
	Name      string
	Label     string
	Nodes     map[string][]string
	Edges     map[string]map[string]bool
	Subgraphs map[string]*Graph
}

func NewGraph

func NewGraph(name string, label string) *Graph

func (*Graph) AddEdge

func (g *Graph) AddEdge(from string, to string)

func (*Graph) AddNode

func (g *Graph) AddNode(node string, config ...string)

AddNode adds a node example: ` "%s" [color="%s",penwidth=2,style="dashed"];`

func (*Graph) AddSubgraph

func (g *Graph) AddSubgraph(sub *Graph)

func (*Graph) RenderAsDot

func (g *Graph) RenderAsDot() string

func (*Graph) RenderDotBody

func (g *Graph) RenderDotBody(indent string) []string

Jump to

Keyboard shortcuts

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