(!= u v)
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. u and v must not be equal. u and v must eventually be given domains if vars.
(* x y product)
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 multiplication and thus division. x, y & product must be eventually be given domains if vars.
(+ x y sum)
A finite domain constraint for addition and subtraction. x, y & sum must eventually be given domains if vars.
A finite domain constraint for addition and subtraction. x, y & sum must eventually be given domains if vars.
(-distinctc x y* n*)
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.
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.
(< u v)
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 v. u and v must eventually be given domains if vars.
(<= u v)
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 must be less than or equal to v. u and v must eventually be given domains if vars.
(== u v)
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 and v must be equal. u and v must eventually be given domains if vars.
(> u v)
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 v. u and v must eventually be given domains if vars.
(>= u v)
A finite domain constraint. u must be greater than or equal to 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.
(bounded-listo l n)
Ensure that the list l never grows beyond bound n. n must have been assigned a domain.
Ensure that the list l never grows beyond bound n. n must have been assigned a domain.
(distinct v*)
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.
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 v*)
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.
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.
(domain & args)
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.
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.
(in & xs-and-dom)
Assign vars to domain. The domain must come last.
Assign vars to domain. The domain must come last.
(interval ub)
(interval lb ub)
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.
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.
(-difference this that)
(-disjoint? this that)
(-intersection this that)
(-member? this n)
(-drop-before this n)
(-drop-one this)
(-keep-before this n)
(multi-interval)
(multi-interval i0)
(multi-interval i0 i1)
(multi-interval i0 i1 & ir)
(process-dom x dom domp)
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.
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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close