dag

package
v0.0.0-...-8ad0a2a Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dag

type Dag struct {
	V          int
	Consumed   int
	VertexList []*Vertex
	NextList   []int
}

func NewDag

func NewDag(v int) *Dag

func (*Dag) AddEdge

func (dag *Dag) AddEdge(from, to int)

func (*Dag) GetInEdges

func (dag *Dag) GetInEdges(to int) []int

func (*Dag) GetOutEdges

func (dag *Dag) GetOutEdges(from int) []int

func (*Dag) HasNext

func (dag *Dag) HasNext() bool

func (*Dag) InDegree

func (dag *Dag) InDegree(i int) int

func (*Dag) Next

func (dag *Dag) Next() []int

func (*Dag) OutDegree

func (dag *Dag) OutDegree(i int) int

func (*Dag) Print

func (dag *Dag) Print() (bytes.Buffer, error)

type Vertex

type Vertex struct {
	InDegree int
	OutEdges []int
	InEdges  []int
}

func NewVertex

func NewVertex() *Vertex

Jump to

Keyboard shortcuts

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