func (g *Graph) Edges() []Edge {
	list := g.edges.List()
	result := make([]Edge, len(list))
	for i, v := range list {
		result[i] = v.(Edge)
	}
	return result
}
Edges returns the list of all the edges in the graph.
package dag
import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"sort"
)
type Graph struct {
	vertices  *Set
	edges     *Set
	downEdges map[interface{}]*Set
	upEdges   map[interface{}]*Set
	debug *encoder
}
type Subgrapher interface {
	Subgraph() Grapher
}
type Grapher interface {
	DirectedGraph() Grapher
}
type Vertex interface{}
type NamedVertex interface {
	Vertex
	Name() string
}
func (g *Graph) DirectedGraph() Grapher {
	return g
}
func (g *Graph) Vertices() []Vertex {
	list := g.vertices.List()
	result := make([]Vertex, len(list))
	for i, v := range list {
		result[i] = v.(Vertex)
	}
	return result
}