• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/usr/eclipseclp/Contrib/

Lines Matching refs:cardinality

37 	on sets cardinality and other optional set functions (minimum and maximum for
50 function of one or more sets (e.g. the cardinality of a set). For instance, the
51 goal of many problems is to maximise or minimise the cardinality of a set. Even
53 to a fixed cardinality or a stricter cardinality domain than just the one inferred
54 by the domain of a set variable (for instance, the cardinality of a set may have
63 The cardinality of a set S, given as a finite domain variable C (#S=C), is not a
64 bijective function since two distinct sets may have the same cardinality. Still,
67 A simple inference that can be done using cardinality information is to instantiate
68 the set to one of the set bounds, when it is known that the set cardinality must be
69 equal to the cardinality of that bound. But Cardinal does much more than that.
72 is thus [{},{a,b}] with cardinality 0 or 2. The intersection of S1 and S2 also
74 intersection cardinality is also either 0 or 2 (it can not be 1). Set solvers
81 that X has exactly 2 elements, it should be inferred that the cardinality of Z can
87 problems where cardinality plays a special role. Cardinal thus fully uses
88 constraint propagation on sets cardinality.
142 (other than cardinality): minimum and maximum, for sets of integers, and union,
150 :-comment(cardinality/2, [
151 amode: cardinality(?,?),
155 desc: html("Cardinality is the cardinality of SetVariable. If Cardinality is given
156 (as an integer or FD variable), then SetVariable is constrained to have such cardinality.
157 If Cardinality is a free variable, then it is unified with the set's cardinality as
160 fail_if: "Fails if Cardinality can not be the cardinality of SetVariable.",
162 ?- S `::[]..[a,b], cardinality(S,C).
163 ?- S `::[]..[a,b], cardinality(S,1).
164 ?- S `::[]+[a,b]:1, cardinality(S,C).
167 ?- cardinality([a,b],C).
170 ?- S `::[c]+[a,b]:[1,3], C #> 1, cardinality(S,C).
182 desc: html("Cardinality is the cardinality of SetExpression, a set term possibly
185 its Cardinality is applied as in cardinality/2."),
187 fail_if: "Fails if Cardinality can not be the cardinality of SetExpression.",
198 see_also:[cardinality/2,(`=)/2]
279 and NMax is the lub's cardinality (i.e. NIn + #(Poss)).<P>
301 desc: html("Domain is unified with the domain of SetVariable (which has cardinality
305 and NMax is the lub's cardinality (i.e. NIn + #(Poss)).
317 retrieve the cardinality of a set, for it will only work when set is ground."),
327 ?- set(S, [],[[a,b],[b,c],[a,c],[b]],[union:[a,b,c],cardinality:C]), domain(S,C,D).
330 see_also:[domain/2,glb/2,poss/2,glb_poss/3,lub/2,lub/4,cardinality/2,(#)/2]
407 see_also:[minimum/2,set/4,sets/4,cardinality/2]
436 see_also:[maximum/2,set/4,sets/4,cardinality/2]
458 see_also:[set/4,sets/4,cardinality/2]
489 see_also:[union_var/2,union_att/3,set/4,sets/4,cardinality/2]
504 "Domain": "A set domain with optional cardinality declaration."],
510 poss (lub\\glb). Cardinality is the SetVariable's cardinality, which may be
522 see_also:[set/4,sets/4,cardinality/2,union_var/2,minimum/2,maximum/2,set_labeling/1]
537 FunctionName:FunctionValue, where FunctionName can be 'cardinality',
540 cardinality: FunctionValue can be an integer, an FD variable or an integer domain (list or range)
549 declared, whereas the cardinality function and respective inferences
550 will always be present even if this (cardinality) function is not
557 ?- set(S,[],[a,b],[cardinality:1]).
558 ?- set(S,[],[a,b],[cardinality:C]).
559 ?- set(S,[],[a,b],[cardinality:[0,2]]).
560 ?- set(S,[c],[a,b,d,e,f,g,h,i,j,k],[cardinality:[2,4..7]]).
563 [cardinality:2, union:[1,2,3,4,5]]). %set-covering
566 see_also:[sets/4,(`::)/2,cardinality/2,union_var/2,minimum/2,maximum/2,set_labeling/1]
580 FunctionName:FunctionValue, where FunctionName can be 'cardinality',
583 cardinality: FunctionValue can be an integer, an FD variable or an integer domain (list or range)
592 declared, whereas the cardinality function and respective inferences
593 will always be present even if this (cardinality) function is not
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]]).
611 see_also:[set/4,(`::)/2,cardinality/2,union_var/2,minimum/2,maximum/2,set_labeling/1]
724 summary: "Label cardinality of set variables",
731 cardinality(H, C),
749 ?- S `:: [a] + [b,c,d,e,f]:[2,3,6,9], card_labeling([S]), cardinality(S,C).
756 see_also:[set_labeling/2,refine/2,cardinality/2]
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).
925 SetVars must be less than or equal to the cardinality of the union of all
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)
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).
1050 ?- sets([X,Y], [],[8,9], [cardinality:1]), X `/= Y, set_labeling([X,Y]).
1124 ?- sets([X,Y], [],[7,8,9], [cardinality:C]), complement(X,Y), card_labeling([X]).
1182 ?- sets([A,B],[a,b],[d,g,h,j],[cardinality:4]), A`\\/B`=U, #(U,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).
1258 glb, NIn its cardinality, Poss is its poss (i.e. its lub\\glb),
1259 and NMax is the lub's cardinality (i.e. NIn + #(Poss)).
1263 cardinality: "Cardinality function (an integer or an FD variable).",