make context great again
This commit is contained in:
@ -16,7 +16,7 @@ func GetTriangles(coords []types.Coords, w, h int) []types.Edge {
|
||||
return output
|
||||
}
|
||||
|
||||
func GetMst(coords []types.Coords, w, h int) []types.Edge {
|
||||
func GetMst(coords []types.Coords, w, h, negativeWeight int) []types.Edge {
|
||||
|
||||
d := &Delaunay{}
|
||||
|
||||
@ -48,7 +48,7 @@ func GetMst(coords []types.Coords, w, h int) []types.Edge {
|
||||
kruskals.SimpleWeightedEdge{
|
||||
nodeMap[e.Nodes[0].Id],
|
||||
nodeMap[e.Nodes[1].Id],
|
||||
int(e.Nodes[0].Coords.DistanceTo(e.Nodes[1].Coords))},
|
||||
negativeWeight - int(e.Nodes[0].Coords.DistanceTo(e.Nodes[1].Coords))},
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user