title: How To Do A Reverse Traversal in QuickGraph?
body: <p>I am using QuickGraph in C# and have a graph that I can traverse by calling Compute on a node and traverse down the graph. However, there are times when I want to select a child node and it traverse in the reverse direction of all the edges.</p>
  
  <p>The documentation is really poor so I was wondering if anyone knows how to do this.</p>
  
  <p>Here is an example</p>
  
  <pre><code>        BidirectionalGraph&lt;string, Edge&lt;string&gt;&gt; graph = new BidirectionalGraph&lt;string, Edge&lt;string&gt;&gt;();
  
          graph.AddVertex("node1");
          graph.AddVertex("node2");
          graph.AddVertex("node3");
          graph.AddVertex("node4");
  
          graph.AddEdge(new Edge&lt;string&gt;("node1", "node2"));
          graph.AddEdge(new Edge&lt;string&gt;("node2", "node3"));
          graph.AddEdge(new Edge&lt;string&gt;("node2", "node4"));
  
          var dfs = new DepthFirstSearchAlgorithm&lt;string, Edge&lt;string&gt;&gt;(graph);
          var observer = new VertexPredecessorRecorderObserver&lt;string, Edge&lt;string&gt;&gt;();
          observer.Attach(dfs);
  
          dfs.Compute("node1");
  
          foreach(var obj in observer.VertexPredecessors) {
              System.Console.WriteLine(obj.Key);
          }
  </code></pre>
  
  <p>If I compute "node1", I get node2,node3,node4.</p>
  
  <p>What I also want to do is compute "node4" and get node2,node1</p>