9c1978125348ab67190995586175a7d6402bf247,src/BayesianModel/BayesianModel.py,BayesianModel,add_edge,#BayesianModel#Any#Any#,99
Before Change
//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])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: scikit-learn-contrib/DESlib
Commit Name: ec396411be11d514a44a18813278f3a41c73ac5f
Time: 2018-09-23
Author: Natlem@users.noreply.github.com
File Name: deslib/dcs/base.py
Class Name: DCS
Method Name: __init__
Project Name: Theano/Theano
Commit Name: 24e7ed3b8f62fd702b2fea624189f93d145ad8b5
Time: 2017-05-30
Author: nouiz@nouiz.org
File Name: theano/gof/fg.py
Class Name: FunctionGraph
Method Name: orderings