Euclid    
     

addToSet(s, x)

Adds the element x to the set s. Does not return anything.

removeFromSet(s, x)

Removes the element x from the set s. Does not return anything.

union(a, b)

Returns the union of the sets a and b.

intersection(a, b)

Returns the intersection of the sets a and b.

isSubset(a, b)

Returns 1 if a is a subset of b, 0 otherwise.

sizeOfSet(s)

Returns the number of elements in the set s.

nthInSet(s, n)

Returns the nth smallest element in the set s (n = 1 returns smallest)

minInSet(s)

Returns the minimum value in the set s.

maxInSet(s)

Returns the maximum value in the set s.

contains(s, x)

Returns 1 if x is an element of the set s, 0 otherwise.

sum(s)

Returns sum of the elements in the set s.

mean(s)

Returns arithmetic mean of the set s.

median(s)

Returns median of the set s.


 Euclid    
Copyright © 2003-2006 Kevin L. Gong