func (g *WeightedUndirectedGraph) Edge(uid, vid int64) graph.Edge {
	return g.WeightedEdgeBetween(uid, vid)
}
Edge returns the edge from u to v if such an edge exists and nil otherwise.
The node v must be directly reachable from u as defined by the From method.
package simple
import (
	"fmt"
	"gonum.org/v1/gonum/graph"
	"gonum.org/v1/gonum/graph/internal/uid"
	"gonum.org/v1/gonum/graph/iterator"
)
var (
	wug *WeightedUndirectedGraph
	_ graph.Graph              = wug
	_ graph.Weighted           = wug
	_ graph.Undirected         = wug
	_ graph.WeightedUndirected = wug
	_ graph.NodeAdder          = wug
	_ graph.NodeRemover        = wug
	_ graph.WeightedEdgeAdder  = wug
	_ graph.EdgeRemover        = wug
)
type WeightedUndirectedGraph struct {
	nodes map[int64]graph.Node
	edges map[int64]map[int64]graph.WeightedEdge
	self, absent float64
	nodeIDs uid.Set
}
func NewWeightedUndirectedGraph(self, absent float64) *WeightedUndirectedGraph {
	return &WeightedUndirectedGraph{
		nodes: make(map[int64]graph.Node),
		edges: make(map[int64]map[int64]graph.WeightedEdge),
		self:   self,
		absent: absent,
		nodeIDs: uid.NewSet(),
	}
}
func (g *WeightedUndirectedGraph) AddNode(n graph.Node) {
	if _, exists := g.nodes[n.ID()]; exists {
		panic(fmt.Sprintf("simple: node ID collision: %d", n.ID()))
	}
	g.nodes[n.ID()] = n
	g.edges[n.ID()] = make(map[int64]graph.WeightedEdge)
	g.nodeIDs.Use(n.ID())
}