caLib_abstract.neighbourhood

This module defines the notion of a $(NEIGHBOURHOOD). A $(NEIGHBOURHOOD) defines what cells in the lattice that are "neighbours". Most ca $(RULE)s change the state of a cell depending on the cells neighbours. * It provides templates for testing whether a given object is a $(NEIGHBOURHOOD), and what kind of $(NEIGHBOURHOOD) it is. * $(CALIB_ABSTRACT_DESC) *

Members

Structs

Neighbourhood
struct Neighbourhood(uint N)

Example of a Neighbourhood

StaticNeighbourhood
struct StaticNeighbourhood(uint N)

Example of a StaticNeighbourhood

Templates

isAnyNeighbourhood
template isAnyNeighbourhood(T)

$(IS_ANY Neighbourhood)

isAnyStaticNeighbourhood
template isAnyStaticNeighbourhood(T)

$(IS_ANY StaticNeighbourhood)

isNeighbourhood
template isNeighbourhood(T, uint N)

Tests if something is a Neighbourhood. * returns true if T is a Neighbourhood of dimension N. * A Neighbourhood is the most basic form of a $(NEIGHBOURHOOD). It's getNeighboursCoordinates function takes a cells position and returns a list of coordinate pairs for it's neighbours positions. * It must define the primitive:
int[N][] getNeighboursCoordinates(Coord).
Where N is the dimension of the Neighbourhood and Coord is an alias for a typetuple containing int's, one int for each dimension (in a 3 dimensional Neighbourhood Coord would be: (int, int, int)). *

isStaticNeighbourhood
template isStaticNeighbourhood(T, uint N)

Tests if something is a StaticNeighbourhood. * returns true if T is a StaticNeighbourhood of dimension N. * A StaticNeighbourhood is a $(NEIGHBOURHOOD) that never changes. If a particular cell has a particular neighbour it will always have that neighbour. Also, if a cell where to have a neighbour "to the right" all other cells will also have a neighbour "to the right". A StaticNeighbourhood dosen't really add any additional functionality. All it does is having the a uint enum NeighboursAmount. *

Meta