func (g *labeledDirected) InDegreeOf(vertex Vertex) (degree int, exists bool) {
	g.mu.RLock()
	defer g.mu.RUnlock()
	return inDegreeOf(g, vertex)
}
Returns the indegree of the provided vertex. If the vertex is not present in the
graph, the second return value will be false.

Note that getting indegree is inefficient for directed adjacency lists; it requires
a full scan of the graph's edge set.
package al
import (
	"sync"
	. "github.com/sdboyer/gogl"
	"gopkg.in/fatih/set.v0"
)
type baseLabeled struct {
	list map[Vertex]map[Vertex]string
	size int
	mu   sync.RWMutex
}
func (g *baseLabeled) Vertices(f VertexStep) {
	g.mu.RLock()
	defer g.mu.RUnlock()
	for v := range g.list {
		if f(v) {
			return
		}
	}
}
func (g *baseLabeled) HasVertex(vertex Vertex) (exists bool) {
	g.mu.RLock()
	defer g.mu.RUnlock()
	exists = g.hasVertex(vertex)
	return
}
func (g *baseLabeled) hasVertex(vertex Vertex) (exists bool) {
	_, exists = g.list[vertex]
	return
}
func (g *baseLabeled) Order() int {
	g.mu.RLock()
	defer g.mu.RUnlock()
	return len(g.list)
}
func (g *baseLabeled) Size() int {
	return g.size
}
func (g *baseLabeled) EnsureVertex(vertices ...Vertex) {
	if len(vertices) == 0 {
		return
	}
	g.mu.Lock()
	defer g.mu.Unlock()
	g.ensureVertex(vertices...)
}
func (g *baseLabeled) ensureVertex(vertices ...Vertex) {
	for _, vertex := range vertices {
		if !g.hasVertex(vertex) {
			g.list[vertex] = make(map[Vertex]string, 10)
		}
	}
	return
}
type labeledDirected struct {
	baseLabeled
}
func (g *labeledDirected) OutDegreeOf(vertex Vertex) (degree int, exists bool) {
	g.mu.RLock()
	defer g.mu.RUnlock()
	if exists = g.hasVertex(vertex); exists {
		degree = len(g.list[vertex])
	}
	return
}