Explore the Example Graph
Explore an example book graph using Elixir's libgraph to understand node adjacency, neighbors, in-edges, out-edges, and paths including shortest paths. Learn how to extract subgraphs and analyze overall graph structures through practical terminal commands and visual demonstrations.
We can now begin exploring the example book graph that we created. There's also a visual demonstration at the end showing output at each step.
Adjacency around the node
Let's look at the adjacency around a single node.
Neighbors
What are the neighbors of the node :pragmatic?
iex> Graph.neighbors(g, :pragmatic)
Out-edges
What are the out-edges from the node ... ...