previous contents index next
(..Declaration Part..) Contents Index (..Declaration Part..)

4.1.4 Neighbourhood (NeighbourDeclaration)

In the very beginning we have seen that a CA is in fact nothing else than a network of equal Moore-automata, the cells. In contrast to them, the cell's transition function does not depend on an external input but on the states of certain ''cells in their neighbourhood'' (neighbours). Of course, we have to state more precisely which are the neighbours of an arbitrary cell.
First of all it seems to be quite logical to postulate an homogeneous environment for an also homogeneous set of cells. According to this, neighbours are normally defined by their relative positions to the cell which they should be neighbours to. Like this, the neighbours of each cell can easily be calculated by adding this relative coordinate to their own coordinate.
 

NeighbourDeclaration - Syntax:

Syntax: NeighbourDeclaration

Because the local rule cannot work without neighbours, never forget this declaration in your SDL programs. It starts with

NEIGHBOUR

followed by at least one entry of the form

NeighbourIdentifier : ( IntExpressionList ) ;

Consider n to be the space dimension, then IntExpressionList must consist of exactly n IntExpression. Since variables and symbolic constants are defined later, it is not allowed to use elements of the classes IntVar, IntConstantIdentifier and IntReg.

While NeighbourIdentifier is the name of the kind of neighbourhood to be created, (IntExpressionList ) denotes the relative position of an arbitrary cell to this neighbour, or more formally:
Suppose that K is the coordinate of an arbitrary cell, we get the coordinate N of its neighbour with regard to the kind of neighbourhood NeighbourIdentifier by the following relation:

N = K + (IntExpression_1, ... , IntExpression_n)^t

(The definition shows that it would be more adequate to speek about "influencing sites" than about "neighbours", because we usually expect a neigbourhood to be a symmetrical relationship, which is not given in this case.)


 
Example 42:

For the two-dimensional general von Neumann neighbourhood H12 of example 3 we obtain

NEIGHBOUR center :  ( 0, 0);
          left   :  (-1, 0);
          right  :  ( 1, 0);
          upper  :  ( 0, 1);
          lower  :  ( 0,-1);


previous contents index next
(..Declaration Part..) Contents Index (..Declaration Part..)