Maps for Node Values
Explore how to represent and query node values in Elixir using maps. Understand how to read graph vertices, find inbound and outbound edges by node properties, and test paths between nodes in directed graphs. This lesson helps you model and interact with graph data effectively in Elixir.
We'll cover the following...
We'll cover the following...
Visual representation
We can use a map for node values, as shown in the following figure.
Reading
We can read our book graph selecting maps for node values as follows:
iex> g = NativeGraph.Examples.Book.book(false)
...