graph

package
v5.0.0-preview.1+incom... Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectedNodeCallback

type ConnectedNodeCallback func(node string) bool

type DelLinkCallback

type DelLinkCallback func(src, link, dst string)

type DelNodeCallback

type DelNodeCallback func(node string)

type Graph

type Graph struct {
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph() *Graph
func (g *Graph) AddLink(src, link, dst string, attr interface{})

func (*Graph) All

func (g *Graph) All() utils.Set

func (*Graph) Attr

func (g *Graph) Attr(src, link, dst string) interface{}
func (g *Graph) BetweenDirLinks(src string, dst string) map[string]interface{}

func (*Graph) Both

func (g *Graph) Both(node string) utils.Set
func (g *Graph) BothByLink(node string, link string) utils.Set

func (*Graph) Connected

func (g *Graph) Connected(node string, cb ConnectedNodeCallback) utils.Set
func (g *Graph) ConnectedByLink(node string, link string, cb ConnectedNodeCallback) utils.Set
func (g *Graph) DeleteLink(src, link, dst string)

func (*Graph) DeleteNode

func (g *Graph) DeleteNode(node string) string

func (*Graph) GetNodeCount

func (g *Graph) GetNodeCount() int

func (*Graph) Ins

func (g *Graph) Ins(node string) utils.Set
func (g *Graph) InsByLink(node string, link string) utils.Set

func (*Graph) NoIn

func (g *Graph) NoIn() utils.Set
func (g *Graph) NoInByLink(link string) utils.Set

func (*Graph) NoOut

func (g *Graph) NoOut() utils.Set
func (g *Graph) NoOutByLink(link string) utils.Set

func (*Graph) Node

func (g *Graph) Node(v string) string

func (*Graph) Outs

func (g *Graph) Outs(node string) utils.Set
func (g *Graph) OutsByLink(node string, link string) utils.Set
func (g *Graph) PurgeOutLinks(src string, cb PurgeOutLinkCallback, param interface{})

func (*Graph) RegisterDelLinkHook

func (g *Graph) RegisterDelLinkHook(cb DelLinkCallback)

func (*Graph) RegisterDelNodeHook

func (g *Graph) RegisterDelNodeHook(cb DelNodeCallback)

func (*Graph) RegisterNewLinkHook

func (g *Graph) RegisterNewLinkHook(cb NewLinkCallback)

func (*Graph) RegisterUpdateLinkAttrHook

func (g *Graph) RegisterUpdateLinkAttrHook(cb UpdateLinkAttrCallback)

func (*Graph) Reset

func (g *Graph) Reset()

type NewLinkCallback

type NewLinkCallback func(src, link, dst string)

type PurgeOutLinkCallback

type PurgeOutLinkCallback func(src, link, dst string, attr interface{}, param interface{}) bool

type UpdateLinkAttrCallback

type UpdateLinkAttrCallback func(src, link, dst string)

Jump to

Keyboard shortcuts

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