gv

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 7 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 {
	// 默认的边界属性
	DefaultEdge _Edge
	// 默认的结点属性
	DefaultNode _Node

	AutoTypeInfo bool
	AutoObjInfo  bool
	// contains filtered or unexported fields
}

func (*Graph) Edge

func (this *Graph) Edge(tailObj, headObj interface{}) *_Edge

获取/添加边, 其中正方向(tail --> head) 默认有箭头 参数可以是 *_Node, 也可以是外部对象, 如果是外部对象则自动生成 *_Node

func (*Graph) GenDotOutput

func (this *Graph) GenDotOutput(outPath, imgFormat string) error

运行dot工具, 生成图片

func (*Graph) IsEdgeAdded

func (this *Graph) IsEdgeAdded(tailObj, headObj interface{}) bool

func (*Graph) IsNodeAdded

func (this *Graph) IsNodeAdded(obj interface{}) bool

func (*Graph) Name

func (this *Graph) Name() string

func (*Graph) Node

func (this *Graph) Node(obj interface{}) *_Node

此函数返回obj对应的结点, 如果obj为nil则返回nil, 如果obj不为nil但结点不存在则创建

func (*Graph) SetName

func (this *Graph) SetName(s string)

func (*Graph) Write

func (this *Graph) Write(w io.Writer)

输出

func (*Graph) WriteFile

func (this *Graph) WriteFile(path string) error

type IExportGv

type IExportGv interface {
	ExportGv(g *Graph)
}

Jump to

Keyboard shortcuts

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