-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial code for consense #113
base: master
Are you sure you want to change the base?
Conversation
|
||
|
||
#minEdgeCC = 0 #length(outputGraphs) | ||
numGraphs <- length(outputGraphs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outputGraphs undefined. sN?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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...