The path counts in the PathCollection are wrongly aggregated. Consider the following code:
>>> p1 = pp.Path('a', 'x', 'c', uid='a-x-c')
>>> p2 = pp.Path('b', 'x', 'd', uid='b-x-d')
>>> pc = pp.PathCollection()
>>> pc.add(p1)
>>> pc.add(p2)
>>> pc.add(p2)
>>> print(pc.counter)
PathPyCounter({'b-x-d': 2, 'a-x-c': 1})
>>> p3 = pp.Path('b', 'x', 'd', uid='b-x-d-2')
>>> pc.add(p3)
>>> print(pc.counter)
PathPyCounter({'b-x-d': 3, 'a-x-c': 1})
Due to the different UIDs, I would expect the paths b-x-d and b-x-d-2 to be counted separately. If the paths are counted based on the traversed nodes, then we should not use the uid of the first path b-x-d in the counter.
I guess the general question is that we need to specify what is the difference between the following lines:
pc.add(pp.Path('a', 'b', uid='x'), count=2)
pc.add(pp.Path('a', 'b', uid='x'), count=1)
pc.add(pp.Path('a', 'b', uid='y'), count=1)
I would argue that we should count the paths based on their uid.
The path counts in the PathCollection are wrongly aggregated. Consider the following code:
Due to the different UIDs, I would expect the paths b-x-d and b-x-d-2 to be counted separately. If the paths are counted based on the traversed nodes, then we should not use the uid of the first path b-x-d in the counter.
I guess the general question is that we need to specify what is the difference between the following lines:
I would argue that we should count the paths based on their uid.