constructor (digraph, start) {
    const _this = this
    this.edgeTo = []
    this.distTo = []
    this.distTo[start] = 0.0
    this.start = start
    this.top = new Topological(digraph)
    this.top.order().forEach(function (vertex) {
      _this.relaxVertex(digraph, vertex, _this)
    })
  }
The LongestPathTree represents a data type for solving the
 single-source longest paths problem in edge-weighted directed
 acyclic graphs (DAGs). The edge weights can be positive, negative, or zero.
 This implementation uses a topological-sort based algorithm.
 the distTo() and hasPathTo() methods take
 constant time and the pathTo() method takes time proportional to the
 number of edges in the longest path returned.