protocol
Set protocol.
Paulo Moura
1.3
2011/2/16
static
(no dependencies on other files)
Deletes an element from a set returning the set of remaining elements.
static
delete(Set,Element,Remaining)
delete(+set,@term,?set) – one
True if the two sets have no element in common.
static
disjoint(Set1,Set2)
disjoint(+set,+set) – zero_or_one
True if the two sets are equal.
static
equal(Set1,Set2)
equal(+set,+set) – zero_or_one
True if the set is empty.
static
empty(Set)
empty(+set) – zero_or_one
Inserts an element in a set, returning the resulting set.
static
insert(In,Element,Out)
insert(+set,+term,?set) – one
Inserts a list of elements in a set, returning the resulting set.
static
insert_all(List,In,Out)
insert_all(+list,+set,?set) – one
True if the two sets have at least one element in common.
static
intersect(Set1,Set2)
intersect(+set,+set) – zero_or_one
Returns the intersection of Set1 and Set2.
static
intersection(Set1,Set2,Intersection)
intersection(+set,+set,?set) – zero_or_one
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
Number of set elements.
static
length(Set,Length)
length(+set,?integer) – zero_or_one
Element is a member of set Set.
static
member(Element,Set)
member(+term,+set) – zero_or_one
member(-term,+set) – zero_or_more
Checks if a term is a member of a set.
static
memberchk(Element,Set)
memberchk(+term,+set) – zero_or_one
Returns the power set of a set, represented as a list of sets.
static
powerset(Set,Powerset)
powerset(+set,-list) – one
Returns the cartesian product of two sets.
static
product(Set1,Set2,Product)
product(+set,+set,-set) – one
Selects an element from a set, returning the set of remaining elements.
static
select(Element,Set,Remaining)
select(?term,+set,?set) – zero_or_more
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
True if Subset is a subset of Set.
static
subset(Subset,Set)
subset(+set,+set) – zero_or_one
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
True if Difference is the symmetric difference of Set1 and Set2.
static
symdiff(Set1,Set2,Difference)
symdiff(+set,+set,?set) – zero_or_one
True if Union is the union of Set1 and Set2.
static
union(Set1,Set2,Union)
union(+set,+set,?set) – zero_or_one
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
(none)
(none)