Documentation ¶
Index ¶
- type Graph
- func (g *Graph) AddEdge(i, j int)
- func (g *Graph) Debug()
- func (g *Graph) DebugString() string
- func (g *Graph) DigestBytes() []byte
- func (g Graph) IsIsolated(i int) bool
- func (g Graph) IsSelfLoop(i int) bool
- func (g Graph) Nexts(i int) []int
- func (g Graph) Prevs(i int) []int
- func (g Graph) Reverse() *Graph
- type Node
- type Vertices
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph struct {
Nodes []Node
}
Graph represents a graph of integers numbered from 0 to n - 1.
func FromForestArray ¶
FromForestArray creates a Graph from array representation of a forest f[i] represents the father of i, if f[i] != i
func (*Graph) DebugString ¶
func (*Graph) DigestBytes ¶
func (Graph) IsIsolated ¶
func (Graph) IsSelfLoop ¶
Click to show internal directories.
Click to hide internal directories.