0ec1a492b302561d7417f3087e1fce09cdd38706,python/dgl/graph.py,DGLGraph,add_nodes,#DGLGraph#Any#Any#,157

Before Change


        assert reprs is None

        // Initialize feature placeholders if there are features existing
        self._node_frame.add_rows(num)

    def add_edge(self, u, v, reprs=None):
        Add one edge.

After Change


        
        self._graph.add_nodes(num)
        self._msg_graph.add_nodes(num)
        if data is None:
            // Initialize feature placeholders if there are features existing
            self._node_frame.add_rows(num)
        else:
            self._node_frame.append(data)

    def add_edge(self, u, v, data=None):
        Add one edge.

        Parameters
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: dmlc/dgl
Commit Name: 0ec1a492b302561d7417f3087e1fce09cdd38706
Time: 2018-11-21
Author: minjie.wang@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: add_nodes


Project Name: dmlc/dgl
Commit Name: 0ec1a492b302561d7417f3087e1fce09cdd38706
Time: 2018-11-21
Author: minjie.wang@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: add_edge


Project Name: dmlc/dgl
Commit Name: 0ec1a492b302561d7417f3087e1fce09cdd38706
Time: 2018-11-21
Author: minjie.wang@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: add_edges