9 def add_node(self, q=None, new_connex=False):
11 Create the memory to store a new edge. Initialize all components to None.
12 Create an empty list of children.
17 self.
connexconnex.append(
None)
22 def add_edge(self, first, second, orientation=0):
24 Add edge from first to second. Also add edge from second to first if orientation
29 self.
childrenchildren[first].append(second)
31 self.
childrenchildren[second].append(first)
35 Create a new connex component for node <idx>
43 Change the index of the all the nodes belonging to a connex component.
44 Useful when merging two connex components.
48 self.
connexconnex = [c
if c != past
else future
for c
in self.
connexconnex]
53 """Return the list of all node indexes belonging to connex component <connex>."""
54 return [i
for i, c
in enumerate(self.
connexconnex)
if c == connex]
def connexIndexes(self, connex)
def add_node(self, q=None, new_connex=False)
def new_connex(self, idx)
def add_edge(self, first, second, orientation=0)
def rename_connex(self, past, future)