Closed yonkeltron closed 6 years ago
This is great! I think it probably makes sense to add a public API function called serialize/2
which takes a graph and a serializer module, that way we don't need to keep increasing the surface of the public API, and third-party extensions can point people to Graph.serialize/2
rather than Graph.Serializer.<whatever>.serialize/1
. That doesn't need to be part of this PR though, so I'll merge as is. Thanks!
Adding the ability to serialize a graph into the edgelist format used by the venerable igraph library and others. Hopefully this will ease the burden of moving graphs from Elixir into other systems for manipulation, analysis, and study.
I moved some of the logic I needed from the DOT
Serializer
module into the baseSerializer
behavior module. Hopefully this wasn't too bad of a move. Happy to clean it up if it doesn't pass muster.Thanks, +Jonathan