Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca-engine-utils.H File Reference

Convenience builders for the Phase 3 synchronous engine. More...

#include <cstdint>
#include <utility>
#include <ca-traits.H>
#include <tpl_ca_storage.H>
#include <tpl_ca_lattice.H>
#include <tpl_ca_neighborhood.H>
#include <tpl_ca_rule.H>
#include <tpl_ca_engine.H>
Include dependency graph for ca-engine-utils.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 
namespace  Aleph::CA
 

Typedefs

using Aleph::CA::Game_Of_Life_Engine = Synchronous_Engine< Lattice< Dense_Cell_Storage< int, 2 >, ToroidalBoundary >, Game_Of_Life_Rule, Moore< 2, 1 > >
 Game-of-Life engine type alias (toroidal, integer cells).
 
using Aleph::CA::Wolfram_1D_Engine = Synchronous_Engine< Lattice< Dense_Cell_Storage< int, 1 >, OpenBoundary >, Lookup_Rule< 2, 2 >, Custom_Neighborhood< 1, 2 > >
 1D Wolfram engine type alias (open boundary, integer cells).
 

Functions

Game_Of_Life_Engine Aleph::CA::make_gol_engine (ca_size_t rows, ca_size_t cols)
 Build a Conway's Game of Life engine of the given shape.
 
Game_Of_Life_Engine Aleph::CA::make_gol_engine (Lattice< Dense_Cell_Storage< int, 2 >, ToroidalBoundary > initial)
 Build a Game of Life engine seeded with an explicit lattice.
 
Wolfram_1D_Engine Aleph::CA::make_wolfram_engine (std::uint8_t rule_no, ca_size_t width)
 Build a 1D elementary Wolfram engine of the given width.
 
Wolfram_1D_Engine Aleph::CA::make_wolfram_engine (std::uint8_t rule_no, Lattice< Dense_Cell_Storage< int, 1 >, OpenBoundary > initial)
 Build a 1D elementary Wolfram engine from an initial row.
 

Detailed Description

Convenience builders for the Phase 3 synchronous engine.

Provides factory functions that pick reasonable defaults for the common cases:

  • make_gol_engine(rows, cols) — Conway's Game of Life on a toroidal int lattice with a Moore radius-1 neighbourhood.
  • make_wolfram_engine(rule_no, width) — elementary 1D Wolfram rule on an open-boundary int lattice.

These helpers exist for users who want a one-liner setup; the underlying engine class lives in tpl_ca_engine.H and accepts any combination of lattice / rule / neighbourhood / iteration order.

Author
Leandro Rabindranath Leon

Definition in file ca-engine-utils.H.