Rule constructor

The general form of the constructor of CA rule is

CArule1d rulename(ruleradius,rulenumber);

When the rule radius is 1, the rule number must be between 0 and 255. When the rule radius equals 2, the rule number must be between 0 and $2^{32} -1$. For higher radii, numbering of rules is not currently supported. One can, however, construct e.g. rule of radius 4, by calling the constructor with one argument

CArule1d rulename(4);


This form of the constructor generates zero rule of radius 4, i.e., a rule with all elements of the lookup table set to zero. One can then set individual bits of the lookuptable directly, by calling

rulename.lookuptable[i]=0;
,

where $i \in \{0,1,\ldots, 2^{2^{radius}} - 1\}$.

It is also possible to construct totalistic rules of radius 2 by calling the following special form of the constructor

CArule1d rulename(2,rulenumber,TOTALISTIC-RULE);


where the rule number is between 0 and 255. Note that this is supported for rules of radius 2 only.

H.F.