func (g LabeledAdjacencyList) EdgeList() (el []LabeledEdge) {
	for fr, to := range g {
		for _, to := range to {
			el = append(el, LabeledEdge{Edge{NI(fr), to.To}, to.Label})
		}
	}
	return
}
Edgelist constructs the edge list rerpresentation of a graph.

An edge is returned for each arc of the graph.  For undirected graphs
this includes reciprocal edges.

See also WeightedEdgeList method.
package graph
import (
	"math"
	"sort"
)
func (g AdjacencyList) HasParallelSort() (has bool, fr, to NI) {
	var t NodeList
	for n, to := range g {
		if len(to) == 0 {
			continue
		}
		t = append(t[:0], to...)
		sort.Sort(t)
		t0 := t[0]
		for _, to := range t[1:] {
			if to == t0 {
				return true, NI(n), t0
			}
			t0 = to
		}
	}
	return false, -1, -1
}
func (g AdjacencyList) IsUndirected() (u bool, from, to NI) {
	unpaired := make(AdjacencyList, len(g))
	for fr, to := range g {
	arc:  
		for _, to := range to {
			if to == NI(fr) {
				continue  
			}
			ut := unpaired[to]
			for i, u := range ut {
				if u == NI(fr) {  
					last := len(ut) - 1
					ut[i] = ut[last]
					unpaired[to] = ut[:last]
					continue arc
				}
			}
			unpaired[fr] = append(unpaired[fr], to)
		}
	}
	for fr, to := range unpaired {
		if len(to) > 0 {
			return false, NI(fr), to[0]
		}
	}
	return true, -1, -1
}