-
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
Clarify support for Undirected Graphs #140
Comments
Let's make this more explicit by adding a wrapper. On Thu, Jan 29, 2015 at 2:05 PM, Peter Lofgren [email protected]
|
I'm using version 7.1.0 and can't find anything explicitly for undirected graphs. What's the correct way of working with undirected graphs? val graphReader = ListOfEdgesGraphReader.forIntIds(
dir, prefix,
graphDir = StoredGraphDir.Mutual
)
val graph = graphReader.toArrayBasedDirectedGraph()
println(graph) prints Node count: 2
Edge count: 2
Nodes:
NodeId => 1
InboundNodes[1] =>2|
OutboundNodes[1] =>2|
NodeId => 2
InboundNodes[0] =>
OutboundNodes[0] => which I think is confusing. |
I have an application where I needed an undirected graph. I actually didn't realize until today that "Mutual" in StoredGraphDir meant undirected and was starting to write my own UndirectedGraph wrapper class when I noticed it. How should we make this more clear? For example I could add a comment to StoredGraphDir along the lines of
Mutual, // In a mutual graph, the outbound and inbound neighbors of each node are equal, and space is typically saved by only storing the outbound neighbors of each node
and/or add to the documentation of DirectedGraph that it actually also supports undirected graphs. Or should there be an UndirectedGraph wrapper in Cassovary?
@pankajgupta
The text was updated successfully, but these errors were encountered: