protocol
setp
Set protocol.
logtalk_load(sets(loader))
static
Public predicates
as_set/2
Returns a set with all unique elements from the given list.
static
as_set(List,Set)
as_set(@list,-set)
- one
as_list/2
Returns a list with all elements of the given set.
static
as_list(Set,List)
as_list(@set,-list)
- one
delete/3
Deletes an element from a set returning the set of remaining elements.
static
delete(Set,Element,Remaining)
delete(+set,@term,?set)
- one
disjoint/2
True if the two sets have no element in common.
static
disjoint(Set1,Set2)
disjoint(+set,+set)
- zero_or_one
equal/2
True if the two sets are equal.
static
equal(Set1,Set2)
equal(+set,+set)
- zero_or_one
empty/1
True if the set is empty.
static
empty(Set)
empty(+set)
- zero_or_one
insert/3
Inserts an element in a set, returning the resulting set.
static
insert(In,Element,Out)
insert(+set,+term,?set)
- one
insert_all/3
Inserts a list of elements in a set, returning the resulting set.
static
insert_all(List,In,Out)
insert_all(+list,+set,?set)
- one
intersect/2
True if the two sets have at least one element in common.
static
intersect(Set1,Set2)
intersect(+set,+set)
- zero_or_one
intersection/3
Returns the intersection of Set1
and Set2
.
static
intersection(Set1,Set2,Intersection)
intersection(+set,+set,?set)
- zero_or_one
intersection/4
True if Intersection
is the intersection of Set1
and Set2
and Difference
is the difference between Set2
and Set1
.
static
intersection(Set1,Set2,Intersection,Difference)
intersection(+set,+set,?set,?set)
- zero_or_one
size/2
Number of set elements.
static
size(Set,Size)
size(+set,?integer)
- zero_or_one
member/2
Element
is a member of set Set
.
static
member(Element,Set)
member(+term,+set)
- zero_or_one
member(-term,+set)
- zero_or_more
memberchk/2
Checks if a term is a member of a set.
static
memberchk(Element,Set)
memberchk(+term,+set)
- zero_or_one
powerset/2
Returns the power set of a set, represented as a list of sets.
static
powerset(Set,Powerset)
powerset(+set,-list)
- one
product/3
Returns the cartesian product of two sets.
static
product(Set1,Set2,Product)
product(+set,+set,-set)
- one
select/3
Selects an element from a set, returning the set of remaining elements.
static
select(Element,Set,Remaining)
select(?term,+set,?set)
- zero_or_more
selectchk/3
Checks that an element can be selected from a set, returning the set of remaining elements.
static
selectchk(Element,Set,Remaining)
selectchk(?term,+set,?set)
- zero_or_one
subset/2
True if Subset
is a subset of Set
.
static
subset(Subset,Set)
subset(+set,+set)
- zero_or_one
subtract/3
True when Difference
contains all and only the elements of Set1
which are not also in Set2
.
static
subtract(Set1,Set2,Difference)
subtract(+set,+set,?set)
- zero_or_one
symdiff/3
True if Difference
is the symmetric difference of Set1
and Set2
, containing all elements that are not in the sets intersection.
static
symdiff(Set1,Set2,Difference)
symdiff(+set,+set,?set)
- zero_or_one
union/3
True if Union
is the union of Set1
and Set2
.
static
union(Set1,Set2,Union)
union(+set,+set,?set)
- zero_or_one
union/4
True if Union
is the union of Set1
and Set2
and Difference
is the difference between Set2
and Set1
.
static
union(Set1,Set2,Union,Difference)
union(+set,+set,?set,?set)
- zero_or_one
Protected predicates
(none)
Private predicates
(none)
Operators
(none)