pyTempNets
pyTempNets copied to clipboard
Remove twopaths based on self loops
The current implementation of extractTwoPaths will find two-paths based on self loops, ie
'a' -> 'b' -> 'b' or 'a' -> 'a' -> 'b' or 'a' -> 'a' -> 'a'
will be marked as valid two-paths if there are appropriate self links.
To avoid this, just make sure s, v and d are jointly not equal when adding the two-path.This can be done with a one-line if statement right before https://github.com/IngoScholtes/pyTempNets/blob/master/pyTempNet/TemporalNetwork.py#L349