Ejemplo n.º 1
0
 private Neighbors<V, E> getSuccessors(V v) {
   Neighbors<V, E> neighbors = successorMap.get(v);
   if (neighbors == null) {
     neighbors = new Neighbors<V, E>(v, Graphs.successorListOf(graph, v));
     successorMap.put(v, neighbors);
   }
   return neighbors;
 }
Ejemplo n.º 2
0
  private void addUnseenChildrenOf(V vertex) {
    for (E edge : specifics.edgesOf(vertex)) {
      if (nListeners != 0) {
        fireEdgeTraversed(createEdgeTraversalEvent(edge));
      }

      V oppositeV = Graphs.getOppositeVertex(graph, edge, vertex);

      if (isSeenVertex(oppositeV)) {
        encounterVertexAgain(oppositeV, edge);
      } else {
        encounterVertex(oppositeV, edge);
      }
    }
  }