9c1978125348ab67190995586175a7d6402bf247,src/BayesianModel/BayesianModel.py,BayesianModel,add_edge,#BayesianModel#,99

Before Change


        
        //string check required because if nodes not present networkx
        //automatically adds those nodes
        if u == v:
            raise Exceptions.SelfLoopError("Self Loops are not allowed")
        if not(isinstance(u, str) and isinstance(v, str)):
            raise TypeError("Name of nodes must be strings")

        nx.DiGraph.add_edge(self, u, v)

        self._update_node_parents([u, v])
        self._update_node_rule_for_parents([u, v])

After Change


        
        //string check required because if nodes not present networkx
        //automatically adds those nodes
        self._check_node_string([u, v])
        if self._check_graph([(u, v)], delete_graph=False):
            nx.DiGraph.add_edge(self, u, v)

        self._update_node_parents([u, v])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: pgmpy/pgmpy
Commit Name: 9c1978125348ab67190995586175a7d6402bf247
Time: 2013-12-31
Author: ankurankan@gmail.com
File Name: src/BayesianModel/BayesianModel.py
Class Name: BayesianModel
Method Name: add_edge


Project Name: pgmpy/pgmpy
Commit Name: 9c1978125348ab67190995586175a7d6402bf247
Time: 2013-12-31
Author: ankurankan@gmail.com
File Name: src/BayesianModel/BayesianModel.py
Class Name: BayesianModel
Method Name: add_edges_from


Project Name: pgmpy/pgmpy
Commit Name: 9c1978125348ab67190995586175a7d6402bf247
Time: 2013-12-31
Author: ankurankan@gmail.com
File Name: src/BayesianModel/BayesianModel.py
Class Name: BayesianModel
Method Name: __init__


Project Name: pgmpy/pgmpy
Commit Name: 9c1978125348ab67190995586175a7d6402bf247
Time: 2013-12-31
Author: ankurankan@gmail.com
File Name: src/BayesianModel/BayesianModel.py
Class Name: BayesianModel
Method Name: add_edge