def reverse
      return self unless directed?
      result = DirectedAdjacencyGraph.new
      each_vertex { |v| result.add_vertex v }
      each_edge { |u,v| result.add_edge(v, u) }
      result
    end
def reverse
      return self unless directed?
      result = DirectedAdjacencyGraph.new
      each_vertex { |v| result.add_vertex v }
      each_edge { |u,v| result.add_edge(v, u) }
      result
    end
Return a new DirectedAdjacencyGraph which has the same set of vertices.
 If (u,v) is an edge of the graph, then (v,u) is an edge of the result.

 If the graph is undirected, the result is self.