Help us shape the future of Go! Take the 2026 Go Developer Survey

graph

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2017 License: GPL-3.0 Imports: 1 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 {
	// contains filtered or unexported fields
}

Graph struct

func New

func New() *Graph

New function

func (*Graph) Cliques

func (g *Graph) Cliques() (cliques [][]Node)

Cliques gets the circular subgraphs We're going to group these together in a single package, so Go doesn't barf.

func (*Graph) Clone

func (g *Graph) Clone() *Graph

Clone the graph

func (*Graph) Edge

func (g *Graph) Edge(parent Node, child Node)

Edge adds an edge

func (*Graph) Node

func (g *Graph) Node(node Node)

func (*Graph) Toposort

func (g *Graph) Toposort() (sorted []Node, hasCycles bool)

Toposort sorts topologically

func (*Graph) ToposortBy

func (g *Graph) ToposortBy(node Node) (sorted []string)

ToposortBy sorts topologically

type Node

type Node interface {
	ID() string
}

Node interface

Jump to

Keyboard shortcuts

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