Table of Contents

Class: Rule cage.py

The rule is an optional mixin class (intended to be mixed in with an Automaton) which allows implementation of generic rules without reference to dimensionality, topology, neighborhood, or any combination. Rules, when used, include a populate method, and a rule method; the rule method is the same Automaton.rule method (which implements state transitions); the populate method is called once when the automaton is initialized and can, say, initialize lookup tables that the rule method relies upon.

Methods   
__init__
populate
rule
  __init__ 
__init__ ( self )

Exceptions   
NotImplementedError
  populate 
populate ( self )

Initialize information needed to calculate rules, e.g., a lookup table.

  rule 
rule ( self,  address )

The main state transition function, prepackaged as a Rule.

Exceptions   
NotImplementedError

Table of Contents

This document was automatically generated on Sat Jul 29 13:31:37 2006 by HappyDoc version 2.1