scc

package
v0.0.0-...-7bca272 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component []interface{}

type State

type State interface {

	// Visit has to be called when visiting a node,
	// before any recursion happens.
	Visit(node interface{})

	// EndVisit has to be called before ending a visit to a node,
	// after all recursions have happened.
	EndVisit(node interface{}) (isComponentRoot bool, component Component)

	// HandleEdge is to be called to before recursing into a neighbour.
	// If the result (shouldRecurse) is false: don't recurse!
	HandleEdge(from, to interface{}) (shouldRecurse bool)

	// AfterRecurse is to be called after recursion into a neighbour is done.
	// It should not be called if HandleEdge(from, to) returned false.
	AfterRecurse(from, to interface{})
	// contains filtered or unexported methods
}

State is contains all the state for one run of the strongly connected components (SCC) graph algorithm.

func StartSCC

func StartSCC() State

Jump to

Keyboard shortcuts

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