code: protected BiDiNavigator<Vertex> constructBiDiNavigator(RelationFactory<Vertex,Vertex> relFact) {
  	final Relation<Vertex,Vertex> prevRel = relFact.create();
  	final ForwardNavigator<Vertex> fnav = getForwardNavigator();
  	
  	for(Vertex vertex : vertices())
  	    for (Vertex next : fnav.next(vertex))
  		prevRel.add(next, vertex);
  	
  	final NonIterableMap<Vertex,List<Vertex>> v2preds = 
  	    new NonIterableMap<Vertex,List<Vertex>>();
  	// agree on some order between the preds
  	for(Vertex v : prevRel.keys()) {
  	    v2preds.put(v, new ArrayList<Vertex>(prevRel.getValues(v)));
  	}
  	
  	return new BiDiNavigator<Vertex>() {
  	    public List<Vertex> next(Vertex vertex) {
  		return fnav.next(vertex);
  	    }
  	    public List<Vertex> prev(Vertex vertex) {
  		List<Vertex> prev = v2preds.get(vertex);
  		if(prev == null) return Collections.<Vertex>emptyList();
  		return prev;
  	    }
  	};
      }
docs: Construct a full navigator, starting from the forward
  navigator, as given by the method
  <code>getForwardNavigator</code>.  To construct the list of
  prdecessors, we reverse the edges by with the help of a
  relation constructed using the forward naviator.
  
  By default, <code>getBiDiNavigator</code> calls this method using
  the default (hash-map and hash-set based)
  <code>jpaul.DataStructs.MapSetRelationFactory</code>.  For a
  graph with a small degree, a subclass may choose to override
  <code>getBiDiNavigator</code> to use some other
  <code>RelationFactory</code>.