Documentation ¶
Index ¶
- type Digraph
- func (d *Digraph) AddVertex(v Vertex) error
- func (d *Digraph) CheckCircle() bool
- func (d *Digraph) CirclePath() string
- func (d *Digraph) E() int
- func (d *Digraph) String() string
- func (d *Digraph) TopologicalOrder() []Vertex
- func (d *Digraph) V() int
- func (d *Digraph) Vertex(id ID) Vertex
- func (d *Digraph) Vertices() []Vertex
- type ID
- type Vertex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Digraph ¶
type Digraph struct {
// contains filtered or unexported fields
}
Digraph represents a directed graph
func (*Digraph) CheckCircle ¶
CheckCircle return true if circle is found in the graph
func (*Digraph) CirclePath ¶
CirclePath returns the circle or empty string if it is not found
func (*Digraph) TopologicalOrder ¶
TopologicalOrder returns vertices in topological order
Click to show internal directories.
Click to hide internal directories.