예제 #1
0
 def __init__(self, name='unknown'):
     if self.name is None:
         self.name = name
     self.eout = []
     self.ein = []
     from pike import Graph
     Graph.register_node(self)
예제 #2
0
 def replace(self, node):
     """ Set the aliased node. """
     node = asnode(node)
     from pike import Graph
     self.deregister()
     node.deregister()
     Graph.register_node(node)
     node.ein = self.ein
     for edge in self.ein:
         edge.n2 = node
     node.eout = self.eout
     for edge in self.eout:
         edge.n1 = node