View Source SimpleGraph (simple_graph v0.1.0)

A complete graph

Link to this section Summary

Link to this section Types

Specs

t() :: %SimpleGraph{
  id: String.t(),
  name: String.t(),
  nodes: %{required(binary()) => SimpleGraph.Node.t()}
}

Link to this section Functions

Specs

add_node(
  graph: t(),
  name: atom(),
  node: binary(),
  outgoing: binary(),
  incoming: binary()
) :: t()

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

get_node(graph, node_id)

View Source

Specs

get_node(t(), String.t()) :: {:ok, SimpleGraph.Node.t()} | {:error, String.t()}

Specs

graph(atom()) :: t()

Specs

put_node(t(), SimpleGraph.Node.t()) :: t()