Skip to content

Commit

Permalink
feat: draw shortest path in red
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Sep 3, 2019
1 parent 31653d8 commit 1cb68fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions graph/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ func Graph(opts *Options) (string, error) {
if !opts.NoPertEstimates {
_ = graphman.ComputePert(graph)
//for _, e := range graph.Edges() {log.Println("*", e)}
shortestPath, _ := graph.FindShortestPath("Start", "Finish")
for _, edge := range shortestPath {
edge.Dst().SetColor("red")
edge.SetColor("red")
}
}

// graph fine tuning
Expand Down

0 comments on commit 1cb68fe

Please sign in to comment.