Giraffe.Graph (giraffe v0.1.0)

Public interface for working with graphs. Delegates to specific implementations based on whether the graph is directed or undirected.

Summary

Types

edge()

@type edge() :: {vertex(), vertex(), weight()}

t()

@type t() :: %Giraffe.Graph{
  impl: Giraffe.Graph.Directed.t() | Giraffe.Graph.Undirected.t(),
  type: :directed | :undirected
}

vertex()

@type vertex() :: any()

weight()

@type weight() :: number()

Functions

add_edge(graph, from, to, weight)

add_vertex(graph, vertex)

edges(graph)

get_paths(graph, start, finish)

get_shortest_path(graph, start, finish)

new(atom)

vertices(graph)