PregelEx.Builder (PregelEx v0.1.3)

View Source

Summary

Functions

Adds an edge between two vertices in the builder.

Adds a vertex to the builder.

Initializes a new graph builder with the given name.

Creates the graph using the builder's properties.

Types

t()

@type t() :: %PregelEx.Builder{edges: [tuple()], name: String.t(), vertices: [map()]}

Functions

add_edge(arg, source, target, opts \\ [])

Adds an edge between two vertices in the builder.

Validation

  • Both vertices must exist in the builder.

add_vertex(arg, name, function, opts \\ [])

@spec add_vertex({:ok, t()}, String.t(), (map() -> map()), keyword()) ::
  {:ok, t()} | {:error, String.t()}

Adds a vertex to the builder.

Validation

  • The vertex must have a unique name.

build(name)

@spec build(String.t()) :: {:ok, t()}

Initializes a new graph builder with the given name.

finish(arg)

@spec finish({:ok, t()}) :: {:ok, String.t(), pid()} | {:error, String.t()}

Creates the graph using the builder's properties.

type()