func (g *weightedDirected) 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
}
Returns the outdegree of the provided vertex. If the vertex is not present in the
graph, the second return value will be false.
package al
import (
	"sync"
	. "github.com/sdboyer/gogl"
	"gopkg.in/fatih/set.v0"
)
type baseWeighted struct {
	list map[Vertex]map[Vertex]float64
	size int
	mu   sync.RWMutex
}
func (g *baseWeighted) Vertices(f VertexStep) {
	g.mu.RLock()
	defer g.mu.RUnlock()
	for v := range g.list {
		if f(v) {
			return
		}
	}
}
func (g *baseWeighted) HasVertex(vertex Vertex) (exists bool) {
	g.mu.RLock()
	defer g.mu.RUnlock()
	exists = g.hasVertex(vertex)
	return
}
func (g *baseWeighted) hasVertex(vertex Vertex) (exists bool) {
	_, exists = g.list[vertex]
	return
}
func (g *baseWeighted) Order() int {
	g.mu.RLock()
	defer g.mu.RUnlock()
	return len(g.list)
}
func (g *baseWeighted) Size() int {
	return g.size
}
func (g *baseWeighted) EnsureVertex(vertices ...Vertex) {
	if len(vertices) == 0 {
		return
	}
	g.mu.Lock()
	defer g.mu.Unlock()
	g.ensureVertex(vertices...)
}
func (g *baseWeighted) ensureVertex(vertices ...Vertex) {
	for _, vertex := range vertices {
		if !g.hasVertex(vertex) {
			g.list[vertex] = make(map[Vertex]float64, 10)
		}
	}
	return
}
type weightedDirected struct {
	baseWeighted
}