sig
val to_1d : int -> int -> int -> int -> int
val of_1d : 'a -> int -> int -> int * int
val set : int -> int -> 'a array -> int -> int -> 'a -> unit
val get : int -> int -> 'a array -> int -> int -> 'a
val init : int -> int -> (int -> int -> 'a) -> 'a array
val iteri : int -> (int -> int -> 'a -> unit) -> 'a array -> unit
val mapi : int -> (int -> int -> 'a -> 'b) -> 'a array -> 'b array
val distance_to_boundary : int -> int -> int -> int
end