Module type Types.Topology


module type Topology = sig .. end
A topology defines the neighborhoud of each cell and how to draw a configuration; they are implemented in folder rule, like the simple Topology.Line

val neighbourhoods : int array array
neighbourhoods is the neighbourhood of each cell, each neighbourhood being encoded as an array of indexes. neighbourhoods.(i) doesn't contain i (the index of the cell itself).

Array.length neighbourhoods is thus the number of cells

val distance_to_boundary : int -> int
This function isn't used in the Periodic topology.

graphics


val init_drawings : simulation_time:int -> unit
init_drawings simulation_time is guaranted to be called in the experiment before any call to draw_configuration.
val draw_configuration : unit -> ('a -> Graphics.color) -> 'a array -> int -> unit
draw_configuration () color_of_state configuration time () needed to keep polymorphism (?!).

configuration of type 'a instead of state, so that this function can be used to plot filtered configurations (custom local complexity for instance).