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

A Worked Example

It’s time to get in some practice with an extended workout with a real graph to see what we can discover about it when using the libgraph package. This will give us a sense of the completeness of libgraph as a graph library.

As an initial worked example, we’ll add the book graph to our library examples. This example will be helpful because of its small size and because we can get a simple visualization of the complete graph.

We’ll start off by creating a module for the book example:

 defmodule​ NativeGraph.Examples.Book ​do
 
 # ...
 
 end

Next, we’ll create the example graph. Because we’ll want to retrieve either one book or all books, let’s create two public entry points: book/1 (for one book) and books/1 (for all ...

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