Module Sorting

module Sorting: sig .. end
Sorting Constraint

val sort : Var.Fd.t array -> Var.Fd.t array
sort a returns an array of variables constrained to be the variables in a sorted in increasing order.
val sortp : Var.Fd.t array -> Var.Fd.t array * Var.Fd.t array
sortp a same as sort but returns a couple (sorted, perm) where sorted is the array of sorted variables and perm is an array of variables constrained to be the permutation between a and sorted, i.e. a.(i) = sorted.(perm.(i)).
val cstr : Var.Fd.t array -> ?p:Var.Fd.t array option -> Var.Fd.t array -> Cstr.t
cstr a (?perm:None) sorted returns the constraint ensuring that sorted is the result of sorting array a according to the permutation perm. perm default value is None, meaning the argument is irrelevant. Raises Invalid_argument if arrays have incompatible length. Not reifiable.