These predicate allow the user to get some information about FD variables. They are not constraints, they only return the current state of a variable.
Templates
Description
fd_min(X, N) succeeds if N is the minimal value of the current domain of X.
fd_max(X, N) succeeds if N is the maximal value of the current domain of X.
fd_size(X, N) succeeds if N is the number of elements of the current domain of X.
fd_dom(X, Values) succeeds if Values is the list of values of the current domain of X.
Errors
X is a variable | instantiation_error | |
X is neither an FD variable nor an integer | type_error(fd_variable, X) | |
N is neither a variable nor an integer | type_error(integer, N) | |
an element E of the Vars list is neither a variable nor an FD variable nor an integer | type_error(fd_variable, E) | |
Values is neither a partial list nor a list | type_error(list, Values) | |
Portability
GNU Prolog predicate.
Templates
Description
fd_has_extra_cstr(X) succeeds if the extra_cstr of X is currently on (section 9.1).
fd_has_vector(X) succeeds if the current domain of X uses a sparse representation (section 9.1).
fd_use_vector(X) enforces a sparse representation for the domain of X (section 9.1).
Errors
X is a variable | instantiation_error | |
X is neither an FD variable nor an integer | type_error(fd_variable, X) | |
Portability
GNU Prolog predicates.