Skip to Main Content
Exploring Graphs with Elixir
book

Exploring Graphs with Elixir

by Tony Hammond
November 2022
Intermediate to advanced content levelIntermediate to advanced
294 pages
5h 58m
English
Pragmatic Bookshelf
Content preview from Exploring Graphs with Elixir

Storing Graphs in the Graph Store

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Concurrent Data Processing in Elixir

Concurrent Data Processing in Elixir

Svilen Gospodinov

Publisher Resources

ISBN: 9798888650059Errata Page