code: function(graph, id, action, flags) {
          var filter = this.filter(flags);
          this.clean(graph);
          var queue = [graph.getNode(id)];
          while(queue.length != 0) {
              var node = queue.pop();
              node._flag = true;
              action(node, node._depth);
              this.eachAdjacency(node, function(adj) {
                  var n = adj.nodeTo;
                  if(n._flag == false && filter(n)) {
                      n._flag = true;
                      queue.unshift(n);
                  }
              }, flags);
          }
      }
docs: /*
  Method: eachBFS
  
  Performs a BFS traversal applying *action* to each <Graph.Node>.
  
  Also implemented by:
  
  <Graph>.
  
  Parameters:
  
  graph - (object) A <Graph>.
  id - (string) A starting node id for the BFS traversal.
  action - (function) A callback function having a <Graph.Node> as first formal parameter.
  
  Example:
  (start code js)
  $jit.Graph.Util.eachBFS(graph, 'mynodeid', function(node) {
  alert(node.name);
  });
  or...
  graph.eachBFS('mynodeid', function(node) {
  alert(node.name);
  });
  (end code)