-
Notifications
You must be signed in to change notification settings - Fork 8
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
Documentation on Building a StaticGraph #20
Comments
You can create a StaticGraph from a SimpleGraph - that's probably the easiest way. Otherwise, you can pass a sorted vector of tuples representing edges. But you might want to reconsider whether you need staticgraphs in the first place. They're more performant for very large (that is, several-billion-edge) graphs and won't give you much more speed for smaller graphs. |
But that is exactly my use case. I have very large objects I want to turn into graphs for persistent storage. It doesn't make sense for me to build a graph as I go and then transfer into a static graph, unless the conversion is trivial. |
But either way, I believe it would make your project more useful and approachable if there was at least some documentation. I had to read the source to understand the API. |
You don't need staticgraphs for that. The use case for staticgraphs is when you're doing graph analytics on large graph structures that have no associated metadata. The underlying StaticGraphs datastore is optimized to take advantage of CPU cache locality. If all you're doing is saving the graph, this won't help you - in fact, it might make things worse since the persistence format for staticgraphs is a non-human-readable binary format, which would require you to write a custom reader in the event you needed to import the graph structure in a non-staticgraphs environment. Note that if you need to save any metadata (vertex or edge data) with the graph, this is not the right graph type (look at MetaGraphs for that).
Depends on your version of trivial, I guess. At a minimum any graph in any format is defined by a list of edges. That's one of the StaticGraphs constructors (as long as that list is sorted).
Point taken. As this was written for a specific project at work, I didn't bother with documentation. I suppose it's worthwhile to put some basics up. |
I would love documentation on how to build a
StaticGraph
from scratch. The constructor is quite intimidating.The text was updated successfully, but these errors were encountered: