sig
module Pattern :
sig
type t = private {
matrix : bool array array;
height : int;
width : int;
}
val create : bool array array -> Tiling.Pattern.t
val apply : D4.t -> Tiling.Pattern.t -> Tiling.Pattern.t
val resize : Tiling.Pattern.t -> w:int -> h:int -> Tiling.Pattern.t
val crop :
Tiling.Pattern.t ->
x:int -> y:int -> w:int -> h:int -> Tiling.Pattern.t
val shift :
Tiling.Pattern.t -> ofsx:int -> ofsy:int -> Tiling.Pattern.t
val union : Tiling.Pattern.t -> Tiling.Pattern.t -> Tiling.Pattern.t
val inter : Tiling.Pattern.t -> Tiling.Pattern.t -> Tiling.Pattern.t
val diff : Tiling.Pattern.t -> Tiling.Pattern.t -> Tiling.Pattern.t
val xor : Tiling.Pattern.t -> Tiling.Pattern.t -> Tiling.Pattern.t
val has_iso : D4.t -> Tiling.Pattern.t -> bool
val print : Format.formatter -> Tiling.Pattern.t -> unit
end
module Tile :
sig
type symetries = Snone | Srotations | Sall
type multiplicity = Minf | Mone | Mmaybe
type t = private {
name : string option;
pattern : Tiling.Pattern.t;
multiplicity : Tiling.Tile.multiplicity;
symetries : Tiling.Tile.symetries;
isos : D4.subgroup;
}
val create :
?name:string ->
?s:Tiling.Tile.symetries ->
?m:Tiling.Tile.multiplicity -> Tiling.Pattern.t -> Tiling.Tile.t
val apply : D4.t -> Tiling.Tile.t -> Tiling.Tile.t
val print : Format.formatter -> Tiling.Tile.t -> unit
end
type problem = private {
grid : Tiling.Pattern.t;
pname : string;
pieces : Tiling.Tile.t list;
}
val create_problem :
?name:string -> Tiling.Pattern.t -> Tiling.Tile.t list -> Tiling.problem
val print_problem : Format.formatter -> Tiling.problem -> unit
type emc = {
primary : int;
matrix : bool array array;
tiles : (Tiling.Tile.t * int * int) array;
}
val emc : Tiling.problem -> Tiling.emc
val print_solution_to_svg :
Format.formatter ->
width:int ->
height:int -> Tiling.problem -> Tiling.emc -> int list -> unit
val print_solution_to_svg_file :
string ->
width:int ->
height:int -> Tiling.problem -> Tiling.emc -> int list -> unit
val print_solution_ascii :
Format.formatter -> Tiling.problem -> Tiling.emc -> int list -> unit
end