python/data_mining/graph.py
def put_edge(self, edge):
        """Adds the edge to the graph.

        Args:
            edge ((int, int)): edge between nodes edge[0] and edge[1].
        """
        u, v = edge
        if v in self._node_neighbors[u]:
            raise ValueError('edge {} already exists'.format(edge))
        self._node_neighbors[u].add(v)
        self._node_neighbors[v].add(u)
        self.edges.add(edge)
Adds the edge to the graph.

        Args:
            edge ((int, int)): edge between nodes edge[0] and edge[1].
        
Adds the edge to the graph.
Adds the edge to the graph .
def put_edge(self, edge):
        u, v = edge
        if v in self._node_neighbors[u]:
            raise ValueError('edge {} already exists'.format(edge))
        self._node_neighbors[u].add(v)
        self._node_neighbors[v].add(u)
        self.edges.add(edge)
def put_edge ( self , edge ) : u , v = edge if v in self . _node_neighbors [ u ] : raise ValueError ( 'edge {} already exists' . format ( edge ) ) self . _node_neighbors [ u ] . add ( v ) self . _node_neighbors [ v ] . add ( u ) self . edges . add ( edge )
Adds the edge to the graph.
Adds the edge to the graph .
"""Adds the edge to the graph.

        Args:
            edge ((int, int)): edge between nodes edge[0] and edge[1].
        """
self
edge
None