November 2022
Intermediate to advanced
294 pages
5h 58m
English
It’s fine to enter the graph data interactively, but it can get a little tiresome after a while. We’d rather read our graphs back from a filestore, so we’ll need to be able to write the graphs out to some text format—that is, to serialize the graph data structures—for disk-based storage.
The libgraph package includes two serialization functions in the Graph module: to_dot/1 and to_edgelist/1. The former renders the graph using the well-known DOT format from the Graphviz[10] distribution, while the latter is a plaintext rendering of graph edges suitable for using with graph libraries such as the igraph[11] library.
We’ll work with the DOT format here as this is a common serialization used by many software packages ...