Module Measure.Light_cones


module Light_cones: sig .. end


[f|p]lc stands for [future|past] light cone
type lc_index = int array array 
A ligth cone is represented by an array, each element of this array representing the part of the light cone at a given date. Such a slice of the light cone is an array of cells. Each cell is then represented by its index in a configuration.

The first element of a light cone is the part of the light at the current date, ie an array containing only (the index of) the cell itself. The second is the nearest (according to time) slice, thus the neighbourhood of the cell. The third is also the neighbourhood of the neighbourhood, but without repetitions, and so on.


If we had already translated those indexes into states, then the type would be

(*type lc_state = Types.Cellular_automaton.state array array*)

val identifier_of_lc : ('a array array, int) Hashtbl.t -> (unit -> int) -> 'a array array -> int
Returns the unique identifier of lc_state. Creates a new entry in hash_table if needed, and copy lc:state array array before adding it into the table.
val build_lc_index : int array array -> int -> int -> lc_index
build_lc_index neighbourhoods depth cell builds the light cone of the given cell in terms of indexes. Note that it is either the past or the future light cone since it contains the indexes (or "pointers") to the cells and not the states.
val lcState_of_lcIndex : 'a array array -> lc_index -> 'a array array
lcState_of_lcIndex depth present_configuration pf_configurations lc converts the index representation of cells into a state representation. It merely look for the given indexes into the given configurations.

Asserts depth = Array.length pf_configurations +1.

"pf" means past or future, since this function can translate either the past light cones or the future light cones.


type hackish_hastbl = {
   mutable size : int; (*number of elements*)
}
Deprecated.OCaml 3.08 compatibility, will be removed.
val hackish_hastbl_size : ('a, 'b) Hashtbl.t -> int
val non_discarded_cell : int -> (int -> bool) -> int
val lc_identifiers : lc_index array ->
(lc_index -> 'a array array) -> int array * int
Affects a unique integer identifier to each lc, for easier manipulation. Also returns the number of distinct identifiers.
Returns -1 on cells the light cone of wich is [||].
Assumes All the light cones (except those being [||]) have the same dimensions.