sets.icn: Procedures for set manipulation

procedure cset2set:        set of characters
procedure pairset:         set of table pairs
procedure domain:          domain of table
procedure range:           range of table
procedure inverse:         inverse of table function
procedure seteq:           set equivalence
procedure setlt:           set inclusion
procedure simage:          string image of set

link sets
August 7, 1999; Alan Beale
Contributor: Ralph E. Griswold
This file is in the public domain.

cset2set(c)     returns a set that contains the individual
                characters in cset c.

domain(T)       returns the domain of the function defined by the
                table T.

inverse(T, x)   returns the inverse of the function defined by the
                table T.  If x is null, it's the functional inverse.
                If x is an empty list, it's the relational inverse.
                If x is an empty set, it the relational inverse, but
                with each table member as a set instead of a list.

pairset(T)      converts the table T to an equivalent set of ordered
                pairs.

range(T)        returns the range of the function defined by the
                table T.

seteq(S1, S2)   tests equivalence of sets S1 and S2.

setlt(S1, S2)   tests inclusion of set S1 in S2.

simage(S)       string image of set

Source code | Program Library Page | Icon Home Page