A specialized grid graph result for toroidal (wrapping) grids.
Structurally identical to Yog.Builder.GridGraph, but with its own type
to allow specialized rendering and behavioral hints.
Fields
graph- The underlying Yog graphrows- Number of rows in the gridcols- Number of columns in the gridtopology- Connection pattern (:rook,:queen, etc.)
Summary
Functions
Converts coordinate to ID.
Converts ID to coordinate.
Creates a new toroidal graph result.
Unwraps to a plain graph.
Converts to a standard GridGraph.
Types
@type t() :: %Yog.Builder.ToroidalGraph{ cols: non_neg_integer(), graph: Yog.graph(), rows: non_neg_integer(), topology: atom() }
Functions
Converts coordinate to ID.
Converts ID to coordinate.
@spec new(Yog.graph(), non_neg_integer(), non_neg_integer(), atom()) :: t()
Creates a new toroidal graph result.
Unwraps to a plain graph.
@spec to_grid_graph(t()) :: Yog.Builder.GridGraph.t()
Converts to a standard GridGraph.