Conversation
|
Can you explain in more detail how this branch addresses the problem of switched edge directions? Why did the old code have that bug? I also have that problem, but your examples mainly address the problem of time values. Would be nice if Rossetti could chime in too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem description
When using
time_sliceto create a time slice of a graph, the returned time slice contains wrong timestamps for the end of an interaction (which are always one unit to small) and the time slice does not take all interactions into account for directed graphs and reverses the direction of edges (see #135).The terminology here was a bit confusing to me: when using
time_slice(t_from=0, t_to=2), I expect the graph to include all snapshots fromt=0to and includingt=2. When adding an interactionadd_interaction(t=0, e=2), I expect the interaction to last fromt=0tot=1and vanish ate=2. (I hope I interpret the terminology used by the library correctly).The changes in this branch therefore add an additional time unit when creating the time slice to take this into account.
The changes also respect the direction of edges for directed graphs when checking for
seennodes and when creating a list of interactions.This should fix #135.
Example
Previous behavior:
Behavior after changes: