clojure.core.logic.fd
Vars in clojure.core.logic.fd
*^%
- !=
- A finite domain constraint. u and v must not be equal. u and v
must eventually be given domains if vars.
- *
- A finite domain constraint for multiplication and
thus division. x, y & product must be eventually be given
domains if vars.
- +
- A finite domain constraint for addition and subtraction.
x, y & sum must eventually be given domains if vars.
- ->FiniteDomain
- Positional factory function for class clojure.core.logic.fd.FiniteDomain.
- ->IntervalFD
- Positional factory function for class clojure.core.logic.fd.IntervalFD.
- ->MultiIntervalFD
- Positional factory function for class clojure.core.logic.fd.MultiIntervalFD.
- -distinctc
- The real *individual* distinct constraint. x is a var that now is bound to
a single value. y* were the non-singleton bound vars that existed at the
construction of the constraint. n* is the set of singleton domain values
that existed at the construction of the constraint. We use categorize to
determine the current non-singleton bound vars and singleton vlaues. if x
is in n* or the new singletons we have failed. If not we simply remove
the value of x from the remaining non-singleton domains bound to vars.
- <
- A finite domain constraint. u must be less than v. u and v
must eventually be given domains if vars.
- <=
- A finite domain constraint. u must be less than or equal to v.
u and v must eventually be given domains if vars.
- ==
- A finite domain constraint. u and v must be equal. u and v must
eventually be given domains if vars.
- >
- A finite domain constraint. u must be greater than v. u and v
must eventually be given domains if vars.
- >=
- A finite domain constraint. u must be greater than or equal to v.
u and v must eventually be given domains if vars.
b
- bounded-listo
- Ensure that the list l never grows beyond bound n.
n must have been assigned a domain.
d
- distinct
- A finite domain constraint that will guarantee that
all vars that occur in v* will be unified with unique
values. v* need not be ground. Any vars in v* should
eventually be given a domain.
- distinctc
- The real distinct constraint. v* can be seq of logic vars and
values or it can be a logic var itself. This constraint does not
run until v* has become ground. When it has become ground we group
v* into a set of logic vars and a sorted set of known singleton
values. We then construct the individual constraint for each var.
- dom
- Assign a var x a domain.
- domain
- Construct a domain for assignment to a var. Arguments should
be integers given in sorted order. domains may be more efficient
than intervals when only a few values are possible.
i
- in
- Assign vars to domain. The domain must come last.
- interval
- Construct an interval for an assignment to a var. intervals may
be more efficient that the domain type when the range of possiblities
is large.
p
- process-dom
- If x is a var we update its domain. If it's an integer
we check that it's a member of the given domain. dom is
then new domain, it should have already been calculated from
domp which was the previous domain.