graph

package
v1.0.3-hotfix1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrVertexRepeat           = errors.New("vertex repeat error")
	ErrVertexNotExist         = errors.New("vertex not exist")
	ErrEdgeRepeat             = errors.New("edge repeat error")
	ErrLoopOfTopologicalGraph = errors.New("loop of topological graph")
)

Functions

This section is empty.

Types

type Edge

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

type Graph

type Graph struct {
	StartingVertex *Vertex
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph(startingVertexId string) *Graph

func (*Graph) AddEdge

func (g *Graph) AddEdge(sid, tid string) error

func (*Graph) DelEdge

func (g *Graph) DelEdge(sid, tid string) error

func (Graph) GetVertex

func (g Graph) GetVertex(sid string) *Vertex

type Topo

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

func (Topo) CircleVertexIndex

func (t Topo) CircleVertexIndex() *Vertex

type Vertex

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

func (*Vertex) AddEdge

func (v *Vertex) AddEdge(id string) error

func (*Vertex) DelEdge

func (v *Vertex) DelEdge(id string)

func (Vertex) GetEdgeByIndex

func (v Vertex) GetEdgeByIndex(idx int) Edge

func (Vertex) Size

func (v Vertex) Size() uint

Jump to

Keyboard shortcuts

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