An interface to build and use cellular automata.
More...
An interface to build and use cellular automata.
The Utopia::CellManager and associated constructs allow convenient use of discretizations of physical space into rectangular, hexagonal, or triangular grids.
◆ CellTraits
template<typename StateType , Update update_mode, bool use_def_state_constr = false, typename CellTags = EmptyTag, template< class > class CustomLinkContainers = NoCustomLinks>
◆ NBFuncID
Type of the neighborhood calculating function.
◆ GridStructure
Available grid implementations.
Enumerator |
---|
square | A square lattice grid.
|
triangular | A triangular lattice grid.
|
hexagonal | A hexagonal lattice grid.
|
◆ NBMode
Possible neighborhood types; availability depends on choice of grid.
Enumerator |
---|
empty | Every entity is utterly alone in the world.
|
vonNeumann | The vonNeumann neighborhood, i.e. only nearest neighbors.
|
Moore | The Moore neighborhood, i.e. nearest and next nearest neighbors.
|
hexagonal | The hexagonal neighbourhood, i.e. the neighbourhood on a hexagonal grid.
|
◆ grid_structure_to_string()
std::string Utopia::grid_structure_to_string |
( |
const GridStructure & |
structure | ) |
|
Given an GridStructure enum value, return the corresponding string key.
This iterates over the grid_structure_map and returns the first key that matches the given enum value.
◆ nb_mode_to_string()
std::string Utopia::nb_mode_to_string |
( |
const NBMode & |
nb_mode | ) |
|
Given an NBMode enum value, return the corresponding string key.
This iterates over the nb_mode_map and returns the first key that matches the given enum value.
◆ grid_structure_map
const std::map<std::string, GridStructure> Utopia::grid_structure_map |
Initial value:{
{"square", GridStructure::square},
{"triangular", GridStructure::triangular},
{"hexagonal", GridStructure::hexagonal}
}
A map from strings to grid structure enum values.
◆ nb_mode_map
const std::map<std::string, NBMode> Utopia::nb_mode_map |
Initial value:{
{"empty", NBMode::empty},
{"vonNeumann", NBMode::vonNeumann},
{"Moore", NBMode::Moore},
{"hexagonal", NBMode::hexagonal}
}
A map from strings to neighborhood enum values.