(self, edge, wt=1, label='', attrs=[])
Add an edge to the graph connecting two nodes.
        
        An edge, here, is a pair of nodes like C{(n, m)}.

        @type  edge: tuple
        @param edge: Edge.

        @type  wt: number
        @param wt: Edge weight.
        
        @type  label: string
        @param label: Edge label.
        
        @type  attrs: list
        @param attrs: List of node attributes specified as (attribute, value) tuples.
Add an edge to the graph connecting two nodes.
        
        An edge, here, is a pair of nodes like C{(n, m)}.
Add an edge to the graph connecting two nodes . An edge here is a pair of nodes like C { ( n m ) } .
def add_edge(self, edge, wt=1, label='', attrs=[]):
        """
        Add an edge to the graph connecting two nodes.
        
        An edge, here, is a pair of nodes like C{(n, m)}.

        @type  edge: tuple
        @param edge: Edge.

        @type  wt: number
        @param wt: Edge weight.
        
        @type  label: string
        @param label: Edge label.
        
        @type  attrs: list
        @param attrs: List of node attributes specified as (attribute, value) tuples.
        """
        u, v = edge
        if (v not in self.node_neighbors[u] and u not in self.node_neighbors[v]):
            self.node_neighbors[u].append(v)
            if (u != v):
                self.node_neighbors[v].append(u)
                
            self.add_edge_attributes((u,v), attrs)
            # zwei
            # self.set_edge_properties((u, v), label=label, weight=wt)
        else:
            raise AdditionError("Edge (%s, %s) already in graph" % (u, v))
def add_edge ( self , edge , wt = 1 , label = '' , attrs = [ ] ) : u , v = edge if ( v not in self . node_neighbors [ u ] and u not in self . node_neighbors [ v ] ) : self . node_neighbors [ u ] . append ( v ) if ( u != v ) : self . node_neighbors [ v ] . append ( u ) self . add_edge_attributes ( ( u , v ) , attrs ) # zwei # self.set_edge_properties((u, v), label=label, weight=wt) else : raise AdditionError ( "Edge (%s, %s) already in graph" % ( u , v ) )