code: function(graph, id, startDepth, flags) {
          startDepth = startDepth || 0;
          var filter = this.filter(flags);
          this.eachNode(graph, function(elem) {
              elem._flag = false;
              elem._depth = -1;
          }, flags);
          var root = graph.getNode(id);
          root._depth = startDepth;
          var queue = [root];
          while(queue.length != 0) {
              var node = queue.pop();
              node._flag = true;
              this.eachAdjacency(node, function(adj) {
                  var n = adj.nodeTo;
                  if(n._flag == false && filter(n)) {
                      if(n._depth < 0) n._depth = node._depth + 1 + startDepth;
                      queue.unshift(n);
                  }
              }, flags);
          }
      }
docs: /*
  Method: computeLevels
  
  Performs a BFS traversal setting the correct depth for each node.
  
  Also implemented by:
  
  <Graph>.
  
  Note:
  
  The depth of each node can then be accessed by
  >node._depth
  
  Parameters:
  
  graph - (object) A <Graph>.
  id - (string) A starting node id for the BFS traversal.
  startDepth - (optional|number) A minimum depth value. Default's 0.