Lines Matching refs:sets

36 :-comment(desc, html("Cardinal is a sets constraints library with especial inferences
37 on sets cardinality and other optional set functions (minimum and maximum for
38 sets of integers, and union for sets of sets.)
43 solved if constraint reasoning prunes search space when the sets are not fully
46 Many complex relations between sets can be expressed with constraints such as set
48 operators as intersection, union or difference of sets. Also, as it is often the
50 function of one or more sets (e.g. the cardinality of a set). For instance, the
52 for satisfaction problems, some sets, although still variables, may be constrained
60 specified by an interval [A,B] where A and B are known sets ordered by set inclusion,
64 bijective function since two distinct sets may have the same cardinality. Still,
88 constraint propagation on sets cardinality.
93 Set intervals define a lattice of sets. The set inclusion relation between two
94 sets defines a partial order on P(U), the powerset over a certain universe U,
97 Due to the transitivity rule, the top set, U, includes all sets of P(U);
98 while the bottom set, {}, is included in all sets of P(U). Consequently,
99 sets U and {} constitute an upper bound and a lower bound of P(U), respectively.
105 (thus also including sets {a,b} and {b,d}). Sets {} and {a,b,c,d} are still a
110 by its interval (lattice); all other sets outside this domain are excluded from
118 this interval should be kept as small as possible, in order to discard all sets
120 possible values (sets). The smallest such domain is the one with equal glb and lub,
122 variable that can assume any set value from a collection of known sets, such as
125 for n possible arbitrary sets S1...Sn, the corresponding set variable X has an
131 In Cardinal, all sets are represented as sorted lists, which eases working with
132 sets and lists interchangeably.
142 (other than cardinality): minimum and maximum, for sets of integers, and union,
143 for sets of sets. Refer to the available predicates for details.
226 If SetVariable is a set of sets and a union function attribute has been set,
253 If SetVariable is a set of sets and a union function attribute has been set,
280 If SetVariable is a set of sets and a union function attribute has been set,
307 If SetVariable is a set of sets and a union function attribute has been set,
361 If SetVariable is a set of sets and a union function attribute has been set,
407 see_also:[minimum/2,set/4,sets/4,cardinality/2]
436 see_also:[maximum/2,set/4,sets/4,cardinality/2]
442 args: ["SetVariable": "A Set (variable or ground) of sets.",
444 summary: "Union of a set of sets",
445 desc: html("UnionVar is the union of sets in SetVariable. If UnionVar is given
458 see_also:[set/4,sets/4,cardinality/2]
465 args: ["SetVariable": "A Set (variable or ground) of sets.",
467 summary: "Union Attribute of a set of sets",
470 UnionVar: union of sets in SetVariable<P>
473 list of all elements in the sets of SetVariable's poss (lub\\glb)
477 fail_if: "Fails if SetVariable is not a set of sets or if its union attributte
489 see_also:[union_var/2,union_att/3,set/4,sets/4,cardinality/2]
522 see_also:[set/4,sets/4,cardinality/2,union_var/2,minimum/2,maximum/2,set_labeling/1]
541 union: (SetVariable must be a set of sets.) FunctionValue can be a set, a set variable
566 see_also:[sets/4,(`::)/2,cardinality/2,union_var/2,minimum/2,maximum/2,set_labeling/1]
570 :-comment(sets/4, [
571 amode: sets(+,++,++,+),
584 union: (SetVariable must be a set of sets.) FunctionValue can be a set, a set variable
603 ?- sets([S],[],[a,b],[]).
604 ?- sets([S,T],[],[a,b],[cardinality:1]).
605 ?- sets([X,Y,Z],[],[a,b],[cardinality:C]).
606 ?- sets([X,Y,Z],[],[a,b],[cardinality:[0,2]]).
607 ?- sets([X,Y,Z],[c],[a,b,d,e,f,g,h,i,j,k],[cardinality:[2,4..7]]).
608 ?- sets([X,Y,Z],[],[1,3,4,5,7],[minimum:Min,maximum:1..9]), fd:(Max #> Min+2).
609 ?- sets([X,Y,Z], [], [[1,2,5],[2,4],[3,5],[1,3,4]], [union:[1]+[2,4,5]]).
871 desc: html("Constrain sets SetVar1 and SetVar2 to be disjoint. I.e. SetVar1 and
882 ?- sets([X,Y], [],[8,9], [cardinality:1]), X `$ Y, set_labeling([X,Y]).
890 ?- sets([X,Y], [],[7,8,9], [cardinality:2]), X `$ Y.
893 ?- sets([X,Y], [],[7,8,9], [cardinality:[1,2]]), X `$ Y, #(X,2), #(Y,C).
909 desc: html("Constrain sets SetVar1 and SetVar2 to be disjoint.<P>
919 summary: "All sets disjointness global constraint",
920 desc: html("Constrain all pairs of sets in SetVars to be disjoint. I.e. No two sets
936 ?- sets([X,Y,Z], [],[1,2,7,8,9], [cardinality:2]), all_disjoint([X,Y,Z]).
939 ?- sets([X,Y,Z], [],[1,2,7,8,9], [cardinality:2]), all_disjoint([X,Y,Z]), 2 `@ X, lub(Y,LubY), lub(Z,LubZ)
955 desc: html("Constrain sets SetVar1 and SetVar2 so that SetVar1 contains SetVar2.<P>
989 desc: html("Constrain sets SetVar1 and SetVar2 so that SetVar2 contains SetVar1.<P>
1003 summary: "Union constraint of a list of sets",
1019 ?- sets([X,Y,Z],[a,b],[d,g,h,j],[cardinality:4]), all_union([X,Y,Z],U), #(U,C), fd:dom(C,DomC).
1022 ?- sets([X,Y,Z],[a,b],[d,g,h,j],[]), all_union([X,Y,Z],U), #(U,4), #(Y,C), fd:dom(C,DomC).
1038 desc: html("Constrain sets SetVar1 and SetVar2 to be different.<P>
1039 This constraint is suspended until one of the two sets is bound
1050 ?- sets([X,Y], [],[8,9], [cardinality:1]), X `/= Y, set_labeling([X,Y]).
1055 ?- sets([X,Y], [],[8,9], []), X `/= Y, X=Y.
1074 desc: html("Constrain sets so that Complement is the complement set of SetVar,
1107 desc: html("Constrain sets so that Complement is the complement set of SetVar.
1121 ?- sets([X,Y], [],[7,8,9], []), complement(X,Y), 8 `@ Y, glb_poss(X,GX,PX), glb_poss(Y,GY,PY).
1124 ?- sets([X,Y], [],[7,8,9], [cardinality:C]), complement(X,Y), card_labeling([X]).
1127 ?- sets([X,Y], [],[7,8,9], []), complement(X,Y), X `>= Y, set_labeling(up,[Y]).
1131 ?- sets([X,Y], [],[7,8,9], [minimum:Min]), complement(X,Y), refine(up,X).
1134 ?- sets([X,Y], [],[7,8,9], []), complement(X,Y), #(X,1), #(Y,CY).
1150 desc: html("Constrain sets in both hand sides of equation so that SetExp1 and
1182 ?- sets([A,B],[a,b],[d,g,h,j],[cardinality:4]), A`\\/B`=U, #(U,C), fd:dom(C,DomC).
1185 ?- sets([X,Y],[a,b],[d,g,h,j],[]), X`\\/Y`=U, #(U,4), #(Y,C), fd:dom(C,DomC).
1188 ?- sets([S,X], [],[a,b], [cardinality:[0,2]]), U `= X `\\/ S, #(U,C), fd:dom(C,DomC).
1211 ?- sets([A,B],[a,b],[d,g,h,j],[cardinality:5]), A`/\\B`=I, #(I,C), fd:dom(C,DomC).
1234 ?- sets([A,B],[a,b],[d,g,h,j],[cardinality:5]), A`\\B`=D, #(D,C), fd:dom(C,DomC).
1237 ?- sets([X,Y],[a,b],[d,g,h,j],[]), X`\\Y`=D, #(D,4).
1260 If it is a set of sets and a union function attribute has been
1265 for sets of integers. Free variable if unused.",
1267 for sets of integers. Free variable if unused.",
1268 union: html("Union function, for sets of sets. Free variable if unused;
1272 (sets themselves);
1275 list of all elements in the sets in set's poss (lub\\glb)