Liking cljdoc? Tell your friends :D

clojure.core.logic.fd


!=clj

(!= 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.
sourceraw docstring

!=cclj

(!=c u v)
source

*clj

(* 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.
sourceraw docstring

*cclj

(*c u v w)
source

+clj

(+ 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.
sourceraw docstring

+cclj

(+c u v w)
source

-clj

(- u v w)
source

->fdclj

(->fd vars exprs)
source

-distinctclj

(-distinct x y* n*)
source

-distinctcclj

(-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.
sourceraw docstring

-domcclj

(-domc x)
source

<clj

(< 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.
sourceraw docstring

<=clj

(<= 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.
sourceraw docstring

<=cclj

(<=c u v)
source

==clj

(== 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.
sourceraw docstring

==cclj

(==c u v)
source

>clj

(> 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.
sourceraw docstring

>=clj

(>= 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.
sourceraw docstring

binopsclj

source

binops->fdclj

source

bounded-listoclj

(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.
sourceraw docstring

boundsclj

(bounds i)
source

difference*clj

(difference* is js)
source

disjoint?*clj

(disjoint?* is js)
source

distinctclj

(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.
sourceraw docstring

distinctcclj

(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.
sourceraw docstring

domclj

(dom x dom)

Assign a var x a domain.

Assign a var x a domain.
sourceraw docstring

domainclj

(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.
sourceraw docstring

domcclj

(domc x)
source

eqcljmacro

(eq & forms)
source

eq*clj

(eq* form vars)
(eq* form vars out)
source

eq-formclj

(eq-form form)
source

expandclj

(expand form)
source

ext-dom-fdclj

(ext-dom-fd a x dom domp)
source

extend-to-fdcljmacro

(extend-to-fd t)
source

finite-domain?clj

(finite-domain? x)
source

get-domclj

(get-dom a x)
source

IIntervalcljprotocol

-lbclj

(-lb this)

-ubclj

(-ub this)
source

IIntervalscljprotocol

-intervalsclj

(-intervals this)
source

incljmacro

(in & xs-and-dom)

Assign vars to domain. The domain must come last.

Assign vars to domain. The domain must come last.
sourceraw docstring

intersection*clj

(intersection* is js)
source

intervalclj

(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.
sourceraw docstring

interval-<clj

(interval-< i j)
source

interval-<=clj

(interval-<= i j)
source

interval->clj

(interval-> i j)
source

interval->=clj

(interval->= i j)
source

interval?clj

(interval? x)
source

ISetcljprotocol

-differenceclj

(-difference this that)

-disjoint?clj

(-disjoint? this that)

-intersectionclj

(-intersection this that)

-member?clj

(-member? this n)
source

ISortedDomaincljprotocol

-drop-beforeclj

(-drop-before this n)

-drop-oneclj

(-drop-one this)

-keep-beforeclj

(-keep-before this n)
source

list-sorted?clj

(list-sorted? pred ls)
source

map-sumclj

(map-sum f)
source

multi-intervalclj

(multi-interval)
(multi-interval i0)
(multi-interval i0 i1)
(multi-interval i0 i1 & ir)
source

normalize-intervalsclj

(normalize-intervals is)
source

process-domclj

(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.
sourceraw docstring

quotclj

(quot u v w)
source

resolve-storable-domclj

(resolve-storable-dom a x dom domp)
source

singleton-dom?clj

(singleton-dom? x)
source

sorted-set->domainclj

(sorted-set->domain s)
source

to-valsclj

(to-vals dom)
source

unify-with-domain*clj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close