sig
type couleur = int
type piece = {
b : Sig_resolution.couleur;
g : Sig_resolution.couleur;
h : Sig_resolution.couleur;
d : Sig_resolution.couleur;
}
type plateau = {
mutable c : int;
mutable n : int;
mutable m : int;
mutable p : Sig_resolution.piece option array array;
mutable v : bool;
}
type instance = {
mutable ci : int;
mutable ni : int;
mutable mi : int;
mutable pi : Sig_resolution.piece list;
}
exception Erreur_option
exception Solution_trouvee
exception Solution_trouvee_arg of Sig_resolution.plateau
exception Aucune_solution
exception Mauvais_tableau
exception Erreur_compatibilite_h of (int * int)
exception Erreur_compatibilite_v of (int * int)
exception Ecriture_refusee
val compatible_h :
pieceG:Sig_resolution.piece -> pieceD:Sig_resolution.piece -> bool
val compatible_v :
pieceB:Sig_resolution.piece -> pieceH:Sig_resolution.piece -> bool
val est_valide_plateau : Sig_resolution.plateau -> unit
val couleur_random : c:int -> unit -> Sig_resolution.couleur
val piece_random : c:int -> unit -> Sig_resolution.piece
val creer_instance_random :
?m:int -> ?n:int -> ?c:int -> unit -> Sig_resolution.instance
val ecriture_instance :
?action_confirmation:(string -> unit) ->
i:Sig_resolution.instance -> file:string -> unit
val print_piece : Sig_resolution.piece -> unit
val print_instance : Sig_resolution.instance -> unit
exception Error_Parse_instance
val lecture_instance : file:string -> Sig_resolution.instance
val instance_of_plateau : Sig_resolution.plateau -> Sig_resolution.instance
val plateau_of_instance : Sig_resolution.instance -> Sig_resolution.plateau
val ecriture_plateau :
p:Sig_resolution.plateau ->
?action_confirmation:(string -> unit) -> file:string -> unit
val print_plateau : Sig_resolution.plateau -> unit
val lecture_plateau : file:string -> Sig_resolution.plateau
val creer_plateau_vide :
printP:(Sig_resolution.plateau -> 'a) ->
Sig_resolution.instance -> Sig_resolution.plateau
val compatible_h_option :
Sig_resolution.piece option -> Sig_resolution.piece option -> bool
val compatible_v_option :
Sig_resolution.piece option -> Sig_resolution.piece option -> bool
val est_rajoutable :
piece:Sig_resolution.piece ->
i:int -> j:int -> pl:Sig_resolution.plateau -> bool
val indices_suivants : i:int -> j:int -> n:int -> m:int -> int * int
val argument_suivant :
printP:(Sig_resolution.plateau -> unit) ->
liste_piece:Sig_resolution.piece list ->
plateau:Sig_resolution.plateau ->
icourant:int ->
jcourant:int ->
piece_choisie:Sig_resolution.piece ->
Sig_resolution.piece list * Sig_resolution.plateau * int * int
val resoud_naivement_aux :
printP:(Sig_resolution.plateau -> unit) ->
liste_piece:Sig_resolution.piece list ->
plateau:Sig_resolution.plateau ->
icourant:int -> jcourant:int -> Sig_resolution.plateau list
val resoud_naivement :
?printP:(Sig_resolution.plateau -> unit) ->
Sig_resolution.instance -> Sig_resolution.plateau
exception Interuption_clavier
val test_resolution : unit -> unit
val lecture_et_resolution : string -> unit
end