protocol
setp¶
Set protocol.
staticPublic predicates¶
as_set/2¶
Returns a set with all unique elements from the given list.
staticas_set(List,Set)as_set(@list,-set) - oneas_list/2¶
Returns a list with all elements of the given set.
staticas_list(Set,List)as_list(@set,-list) - onedelete/3¶
Deletes an element from a set returning the set of remaining elements.
staticdelete(Set,Element,Remaining)delete(+set,@term,?set) - onedisjoint/2¶
True if the two sets have no element in common.
staticdisjoint(Set1,Set2)disjoint(+set,+set) - zero_or_oneequal/2¶
True if the two sets are equal.
staticequal(Set1,Set2)equal(+set,+set) - zero_or_oneempty/1¶
True if the set is empty.
staticempty(Set)empty(+set) - zero_or_oneinsert/3¶
Inserts an element in a set, returning the resulting set.
staticinsert(In,Element,Out)insert(+set,+term,?set) - oneinsert_all/3¶
Inserts a list of elements in a set, returning the resulting set.
staticinsert_all(List,In,Out)insert_all(+list,+set,?set) - oneintersect/2¶
True if the two sets have at least one element in common.
staticintersect(Set1,Set2)intersect(+set,+set) - zero_or_oneintersection/3¶
Returns the intersection of Set1 and Set2.
staticintersection(Set1,Set2,Intersection)intersection(+set,+set,?set) - zero_or_oneintersection/4¶
True if Intersection is the intersection of Set1 and Set2 and Difference is the difference between Set2 and Set1.
staticintersection(Set1,Set2,Intersection,Difference)intersection(+set,+set,?set,?set) - zero_or_onesize/2¶
Number of set elements.
staticsize(Set,Size)size(+set,?integer) - zero_or_onemember/2¶
Element is a member of set Set.
staticmember(Element,Set)member(+term,+set) - zero_or_onemember(-term,+set) - zero_or_morememberchk/2¶
Checks if a term is a member of a set.
staticmemberchk(Element,Set)memberchk(+term,+set) - zero_or_onepowerset/2¶
Returns the power set of a set, represented as a list of sets.
staticpowerset(Set,Powerset)powerset(+set,-list) - oneproduct/3¶
Returns the cartesian product of two sets.
staticproduct(Set1,Set2,Product)product(+set,+set,-set) - oneselect/3¶
Selects an element from a set, returning the set of remaining elements.
staticselect(Element,Set,Remaining)select(?term,+set,?set) - zero_or_moreselectchk/3¶
Checks that an element can be selected from a set, returning the set of remaining elements.
staticselectchk(Element,Set,Remaining)selectchk(?term,+set,?set) - zero_or_onesubset/2¶
True if Subset is a subset of Set.
staticsubset(Subset,Set)subset(+set,+set) - zero_or_onesubtract/3¶
True when Difference contains all and only the elements of Set1 which are not also in Set2.
staticsubtract(Set1,Set2,Difference)subtract(+set,+set,?set) - zero_or_onesymdiff/3¶
True if Difference is the symmetric difference of Set1 and Set2, containing all elements that are not in the sets intersection.
staticsymdiff(Set1,Set2,Difference)symdiff(+set,+set,?set) - zero_or_oneProtected predicates¶
(none)
Private predicates¶
(none)