graph.js
function (graph, head, where) {
    var routes = [];

    Graph.Visitor.Stacked(graph, head, function (node, stack, weight) {
      if (where && where.length !== stack.length){
        return;
      }
      routes.push(new Graph.Route(stack.slice(), weight));
    });
    return routes;
  }
function (graph, head, where) {
    var routes = [];

    Graph.Visitor.Stacked(graph, head, function (node, stack, weight) {
      if (where && where.length !== stack.length){
        return;
      }
      routes.push(new Graph.Route(stack.slice(), weight));
    });
    return routes;
  }
function ( graph , head , where ) { var routes = [ ] ; Graph . Visitor . Stacked ( graph , head , function ( node , stack , weight ) { if ( where && where . length !== stack . length ) { return ; } routes . push ( new Graph . Route ( stack . slice ( ) , weight ) ) ; } ) ; return routes ; }
Helper that will return all the routes
that have the given head node as
a starting point.
Helper that will return all the routes that have the given head node as a starting point .