forked from se-sic/coronet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix temporal order of edges for directed networks
In the course of PR se-sic#137, it occurred that the temporal order of edges was broken in directed networks. The cause of this error is the technical implementation to obtain all combinations of items in a key-value set: The call 'combn(nodes, 2)' in the function 'construct.edge.list.from.key.value.list' does not care for the order of the items, although we need to care. To fix this problem, we need to extract the edge list for each item in an item combination separately and use the second one as the receiver of the edge. Additionally, the function 'construct.edge.list.from.key.value.list' is adapted to match the coding conventions: - access the vertex column via its name 'data.vertices', - use 'seq_len' instead of the ':' operator, and - add curly braces for a single-line if-statement. Note: This temporarily breaks some tests due to igraph's normalization on undirected edge lists which reorders some edges (apparently) randomly. Signed-off-by: Claus Hunsen <[email protected]>
- Loading branch information
Showing
2 changed files
with
26 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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