PregelEx.Builder (PregelEx v0.1.1)

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(builder, source, target)

@spec add_edge(t(), binary(), binary()) :: :ok | {:error, String.t()}

Adds an edge between two vertices in the builder.

Validation

  • Both vertices must exist in the builder.

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

@spec add_vertex(t(), String.t(), (map() -> map()), keyword()) :: t()

Adds a vertex to the builder.

Validation

  • The vertex must have a unique name.

build(name)

Initializes a new graph builder with the given name.

finish(builder)

Creates the graph using the builder's properties.

type()