lib/yargraph.rb
# Add an edge between two vertices, adding the vertices in the
# edge to the graph if they aren't already contained within it.
Add an edge between two vertices, adding the vertices in the
edge to the graph if they aren't already contained within it.
Add an edge between two vertices adding the vertices in the edge to the graph if they aren ' t already contained within it .
def add_edge(vertex1, vertex2)
      @vertices << vertex1
      @vertices << vertex2
      @edges.add_edge vertex1, vertex2
      return
    end
def add_edge ( vertex1 , vertex2 ) @vertices << vertex1 @vertices << vertex2 @edges . add_edge vertex1 , vertex2 return end
Add an edge between two vertices, adding the vertices in the
edge to the graph if they aren't already contained within it.
Add an edge between two vertices adding the vertices in the edge to the graph if they aren ' t already contained within it .
vertex1
<not_specific>
vertex2
<not_specific>