exstreme v0.1.0 Exstreme.Graph

This module contains useful functions to get information about a graph.

Summary

Types

t()

Represents the Graph data

Functions

Counts the connected, unconnected, begin and end nodes

Counts the connections

Counts the Graph nodes

Gets the last nodes

Gets the starting gnode

Gets the nodes after the current one

Gets the nodes before the current one

Gets the name in the Graph for one gnode

Types

t :: %Exstreme.Graph{connections: %{key: atom}, name: String.t, nodes: %{key: [{:key, term}]}, params: [{:key, term}]}

Represents the Graph data

Functions

connections_stats(graph)

Specs

connections_stats(t) :: %{key: integer}

Counts the connected, unconnected, begin and end nodes

count_connections(graph)

Specs

count_connections(t) :: non_neg_integer

Counts the connections

count_nodes(graph)

Specs

count_nodes(t) :: non_neg_integer

Counts the Graph nodes

find_last_node(graph)

Specs

find_last_node(t) :: [atom]

Gets the last nodes

find_start_node(graph)

Specs

find_start_node(t) :: [atom]

Gets the starting gnode

get_after_nodes(graph, gnode)

Specs

get_after_nodes(t, atom) :: [atom]

Gets the nodes after the current one

get_before_nodes(graph, gnode)

Specs

get_before_nodes(t, atom) :: [atom]

Gets the nodes before the current one

nid(graph, gnode)

Specs

nid(t, atom) :: atom

Gets the name in the Graph for one gnode