Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoDAG = errors.New("graphs: graph is not a DAG")
Functions ¶
Types ¶
type Dot ¶
type Dot struct {
// contains filtered or unexported fields
}
func NewDotDiGraph ¶
func NewDotDiGraph() *Dot
func (*Dot) AddDottedEdge ¶
type Graph ¶
A Graph is defined by its vertices and edges stored as an adjacency set.
func (*Graph) AddEdge ¶
AddEdge adds an edge to the graph. The edge connects vertex v1 and vertex v2.
func (*Graph) HalfedgesIter ¶
HalfedgesIter returns a channel with all halfedges for the given start vertex.
type Halfedge ¶
type Halfedge struct {
End string
}
A Halfedge is an edge where just the end vertex is stored. The start vertex is inferred from the context.
type Set ¶
type Set map[interface{}]struct{}
A Set is a container that contains each element just once.
func (*Set) Add ¶
Add adds an element to the set. It returns true if the element has been added and false if the set already contained that element.
Click to show internal directories.
Click to hide internal directories.