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)