View Source SimpleGraph.Node (simple_graph v0.1.0)

A Node in the graph. A node has directed edges to others nodes. These nodes are either in the outgoing or in the incoming list. All adjancy nodes are in the adjacent list.

Link to this section Summary

Link to this section Types

Specs

graph_id() :: String.t()

Specs

t() :: %SimpleGraph.Node{
  adjacent: [graph_id()],
  id: binary(),
  incoming: [graph_id()],
  outgoing: [graph_id()],
  parent: graph_id() | nil,
  subgraphs: [graph_id()],
  value: any()
}

Link to this section Functions

Specs

add_node(self: t(), outgoing: t(), incoming: t(), subgraph: t()) ::
  [self: t(), outgoing: t()]
  | [self: t(), incoming: t()]
  | [self: t(), subgraph: t()]

Specs

create_node(any()) :: t()

Specs

remove_node(self: t(), outgoing: t(), incoming: t(), subgraph: t()) ::
  [self: t(), outgoing: t()]
  | [self: t(), incoming: t()]
  | [self: t(), subgraph: t()]