This repository was archived by the owner on Aug 29, 2022. It is now read-only.

Description
This is the getPathsBetweenCollections function of class PathBuilder:
def getPathsBetweenCollections(self, sc1, sc2):
trans1 = []
trans2 = []
paths = []
n1 = len(sc1.states)
n2 = len(sc2.states)
num_paths = 0
for i1 in range(n1):
for i2 in range(n2):
ps = self.getPaths(sc1.states[i1], sc2.states[i2])
for path in ps:
trans1.append((i1, num_paths))
trans2.append((num_paths, i2))
paths.append(path)
num_paths += 1
return (trans1, paths, trans2)
Why the variable num_paths don't need to be set to 0 when variable ps is changed?