7 // Edge represents an edge in the graph, with a source and target vertex.
15 // BasicEdge returns an Edge implementation that simply tracks the source
16 // and target given as-is.
17 func BasicEdge(source, target Vertex) Edge {
18 return &basicEdge{S: source, T: target}
21 // basicEdge is a basic implementation of Edge that has the source and
23 type basicEdge struct {
27 func (e *basicEdge) Hashcode() interface{} {
28 return fmt.Sprintf("%p-%p", e.S, e.T)
31 func (e *basicEdge) Source() Vertex {
35 func (e *basicEdge) Target() Vertex {