Templates
Description
fd_domain(Vars, Lower, Upper) constraints each element X of Vars to take a value in Lower..Upper. This predicate is generally used to set the initial domain of variables to an interval. Vars can be also a single FD variable (or a single Prolog variable).
fd_domain_bool(Vars) is equivalent to fd_domain(Vars, 0, 1) and is used to declare boolean FD variables.
Errors
Vars is not a variable but is a partial list | instantiation_error | |
Vars is neither a variable nor an FD variable nor an integer nor a list | type_error(list, Vars) | |
an element E of the Vars list is neither a variable nor an FD variable nor an integer | type_error(fd_variable, E) | |
Lower is a variable | instantiation_error | |
Lower is neither a variable nor an integer | type_error(integer, Lower) | |
Upper is a variable | instantiation_error | |
Upper is neither a variable nor an integer | type_error(integer, Upper) | |
Portability
GNU Prolog predicate.
Templates
Description
fd_domain(Vars, Values) constraints each element X of the list Vars to take a value in the list Values. This predicate is generally used to set the initial domain of variables to a set of values. The domain of each variable of Vars uses a sparse representation. Vars can be also a single FD variable (or a single Prolog variable).
Errors
Vars is not a variable but is a partial list | instantiation_error | |
Vars is neither a variable nor an FD variable nor an integer nor a list | type_error(list, Vars) | |
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 a partial list or a list with an element E which is a variable | instantiation_error | |
Values is neither a partial list nor a list | type_error(list, Values) | |
an element E of the Values list is neither a variable nor an integer | type_error(integer, E) | |
Portability
GNU Prolog predicate.