[ The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

library(ordset)

Ordered set manipulation utilities

Predicates

list_to_ord_set(+List, ?Set)
Converts a list to a set
ord_disjoint(+Set1, +Set2)
Checks whether two sets are disjoint
ord_insert(+Set1, +Element, ?Set2)
Adds an element to a set
ord_intersect(+Set1, +Set2)
Checks whether two sets have a non-empty intersection
ord_intersect(+Set1, +Set2, ?Intersection)
Computes the intersection of two sets
ord_seteq(+Set1, +Set2)
Compares two sets
ord_subset(+Set1, +Set2)
Checks whether Set1 is a subset of Set2
ord_subtract(+Set1, +Set2, ?Difference)
Subtracts Set2 from Set1
ord_symdiff(+Set1, +Set2, ?Difference)
Computes the symmetric difference of Set1 and Set2
ord_union(+Set1, +Set2, ?Union)
Computes the union of Set1 and Set2

Description

This library implements sets as ordered lists. The benefit of the ordered representation is that the elementary set operations can be done in time proportional to the Sum of the argument sizes rather than their Product. Some of the unordered set routines, such as member/2, length/2,, select/3 can be used unchanged.

About


Generated from ordset.eci on Sat Aug 7 01:44:24 2004