Browse Source

updated to newest igraph version

Simon Van Mierlo 9 years ago
parent
commit
31ec325c27
3 changed files with 6 additions and 6 deletions
  1. 2 2
      mt/ptcal/compiler.py
  2. 2 2
      mt/ptcal/ptcal.py
  3. 2 2
      mt/ptcal/pytcore/core/himesis.py

+ 2 - 2
mt/ptcal/compiler.py

@@ -138,8 +138,8 @@ class ModelAndRuleCompiler :
 
         for e in m['edges'] :
             hg.add_edges(
-                    (atompmIds2himesisIndices[str(e['src'])],
-                      atompmIds2himesisIndices[str(e['dest'])]))        
+                    [(atompmIds2himesisIndices[str(e['src'])],
+                      atompmIds2himesisIndices[str(e['dest'])])])        
 
         return hg
 

+ 2 - 2
mt/ptcal/ptcal.py

@@ -211,7 +211,7 @@ class PyTCoreAbstractionLayer :
                         self._M.vs.select(lambda v : eq(v['$atompmId'],c['id1']))[0]
                     node2 = \
                         self._M.vs.select(lambda v : eq(v['$atompmId'],c['id2']))[0]
-                    self._M.add_edges((node1.index, node2.index))
+                    self._M.add_edges([(node1.index, node2.index)])
                 
                 elif c['op'] == 'RMEDGE' : 
                     pass
@@ -913,7 +913,7 @@ class PyTCoreAbstractionLayer :
                 elif d['op'] == 'RMEDGE' :
                     node1 = self._M.vs[self._M.get_node(d['guid1'])]                
                     node2 = self._M.vs[self._M.get_node(d['guid2'])]                
-                    self._M.add_edges((node1.index, node2.index))
+                    self._M.add_edges([(node1.index, node2.index)])
 
                 elif d['op'] == 'MKEDGE' :
                     pass

+ 2 - 2
mt/ptcal/pytcore/core/himesis.py

@@ -388,7 +388,7 @@ class HimesisPreConditionPatternNAC(HimesisPreConditionPattern):
             if len(src) == len(tgt) == 1:
                 src = src[0]
                 tgt = tgt[0]
-                G.add_edges((src.index, tgt.index))
+                G.add_edges([(src.index, tgt.index)])
             elif len(src) == 0 :
 #                raise Exception('Label does not exist :: '+str(src_label))
                 pass
@@ -529,7 +529,7 @@ class HimesisPostConditionPattern(HimesisPattern):
                        label == self.vs[e.target][Himesis.Constants.MT_LABEL]))):
                 src_label = self.vs[edge.source][Himesis.Constants.MT_LABEL]
                 tgt_label = self.vs[edge.target][Himesis.Constants.MT_LABEL]
-                graph.add_edges((labels[src_label], labels[tgt_label]))
+                graph.add_edges([(labels[src_label], labels[tgt_label])])
                 packet.deltas.append(
                         {'op':'MKEDGE',                        
                          'guid1':graph.vs[labels[src_label]][Himesis.Constants.GUID],