DAG

Directed Acyclic Graph (DAG) implementation in Elixir

As opposed to Erlang's [:digraph](digraph] module, this library implements a DAG in a basic Elixir %DAG{} struct, containing vertices and edges.

:digraph is great for large graphs, and for when you need cyclic directed graphs; however the more simple acyclic graphs can be managed more efficiently in a struct. Especially when they are not too big. Note that this library is not optimized for performance in any way.

Installation

If available in Hex, the package can be installed by adding dag to your list of dependencies in mix.exs:

def deps do
  [
    {:dag, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/dag.