-
Notifications
You must be signed in to change notification settings - Fork 148
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
Undirected Graph Support in Cassovary #141
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,29 @@ | |||
package com.twitter.cassovary.graph |
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.
pls add the standard copyright header you can get from other files (except change 2014 to 2015)
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.
Done
@szymonm : I was also just thinking that, and agree that parametrizing Graph with NodeType will be better. Let's do that in a separate PR. See my comment above, we can do getNodeById to return UndirectedNode in UndirectedGraph regardless. |
On the other hand, I used: https://github.com/scala-graph/scala-graph. They use:
and IMO this type magic makes the library very hard to use... So let's be carefull about that. |
:) Agreed that there's a balance. Parametrizing by NodeType is good I think. |
Allows nodes that store neighbors sorted in ArrayBasedGraph Improved design of filing inEdges
Closeness centrality
Incorporating Pankaj and Szymon's comments
Incorporating Pankaj and Szymon's comments
(Sorry for the delay). I changed UndirectedGraph to a trait, made UndirectedNode a sub-trait of UnidirectedNode, and made UndirectedGraph's methods return UndirectedNode. I think that addresses all of your comments. I also just rebased from master. |
Ouch, somehow I missed your updated commits, Peter! |
Ping @plofgren |
To be honest, I don't think I'll get back to this until at least after I finish my PhD in a couple months. It doesn't really add functionality, so I propose we just drop it and optionally change the documentation as suggested in #140. |
Ah, you have done a lot of work. Let's leave this open for now and hope you come back to it when you get time. Or someone else might pick it up too. |
Sounds good. |
Pankaj Gupta seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Related to #140
The idea of this wrapper is that each graph implementation shouldn't need custom code for
StoredGraphDir.Mutual
. We can write a single wrapper which works with any graph implementation.Here is an initial undirected graph class. If this looks good, I can add a test and support for mutable undirected graphs to this pull request.
@pankajgupta