Conversation
|
|
||
|
|
||
| #minEdgeCC = 0 #length(outputGraphs) | ||
| numGraphs <- length(outputGraphs) |
There was a problem hiding this comment.
Yes, that should have been sN.
| sNEdges <- vector(mode="list", length=numGraphs) | ||
| sNVerts <- vector(mode="list", length=numGraphs) | ||
| edgePairsList <- c() #vector(mode="list", length=numGraphs) | ||
| for (i in 1:numGraphs){ |
There was a problem hiding this comment.
I would make a hash with keys paste()'ed from incident vertices, and just count occurrences. Our input graphs are simple, so any observation must stem from a different subnetwork. They are also directed, so you don't even have to worry about whether a-b is also b-a (Nb. this problem is usually resolved in undirected graphs by lexically sorting the incident vertices). Just dump the incident edges into a data frame for each input graph, then iterate over the rows, make keys and create a hash entry (if new) or increment its value (if it exists).
There was a problem hiding this comment.
Thanks Boris. I was trying to create the pasted combined vertices in edgePairs on line 40. I was using a list, and tried to create the count table from that list, but I agree that your strategy makes more sense.
very initial...