mirror of
https://github.com/gonum/gonum.git
synced 2025-10-07 16:11:03 +08:00
graph: change Edge interface to include ID method
This is to allow future handling of multigraphs.
This commit is contained in:
@@ -224,6 +224,7 @@ type weightedEdge struct {
|
||||
|
||||
func (e weightedEdge) From() graph.Node { return e.from }
|
||||
func (e weightedEdge) To() graph.Node { return e.to }
|
||||
func (e weightedEdge) ID() int64 { return 0 }
|
||||
func (e weightedEdge) Weight() float64 { return e.cost }
|
||||
|
||||
func isMonotonic(g UndirectedWeightLister, h Heuristic) (ok bool, at graph.Edge, goal graph.Node) {
|
||||
|
Reference in New Issue
Block a user