question: public Set < V > determineConnectedVertices ( V v ) { Set < V > visited = new LinkedHashSet < V > ( ) ; Queue < V > queue = new LinkedList < V > ( ) ; queue . add ( v ) ; while ( ! queue . isEmpty ( ) ) { V current = queue . poll ( ) ; if ( visited . contains ( current ) ) continue ; visited . add ( current ) ; queue . addAll ( getParents ( current ) ) ; queue . addAll ( getChildren ( current ) ) ; } return visited ; }
target:  Follows all edges adjacent to the given vertex v ignoring edge directions and returns a set containing all vertices visited that way