protocol
setp
Set protocol.
logtalk_load(sets(loader))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 the remaining elements.
staticdelete(Set,Element,Remaining)delete(@set,@term,-set) - onedisjoint/2
True when the two sets have no element in common.
staticdisjoint(Set1,Set2)disjoint(@set,@set) - zero_or_oneequal/2
True when the two sets are equal.
staticequal(Set1,Set2)equal(@set,@set) - zero_or_oneempty/1
True when 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 all the elements of the list into 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
Computes the intersection of Set1 and Set2.
staticintersection(Set1,Set2,Intersection)intersection(@set,@set,-set) - oneintersection/4
Computes the intersection and the difference between Set2 and Set1.
staticintersection(Set1,Set2,Intersection,Difference)intersection(@set,@set,-set,-set) - 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_morememberchk/2
True when 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(set)) - 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
True if 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
Computes the set of all the elements of Set1 which are not also in Set2.
staticsubtract(Set1,Set2,Difference)subtract(@set,@set,-set) - onesymdiff/3
Computes 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) - oneunion/3
Computes the union of Set1 and Set2.
staticunion(Set1,Set2,Union)union(@set,@set,-set) - oneunion/4
Computes the union of Set1 and Set2 and the difference between Set2 and Set1.
staticunion(Set1,Set2,Union,Difference)union(@set,@set,-set,-set) - oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)