home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1989-10-08 | 1.9 KB | 72 lines |
-
- (* SAC Set definition module. *)
-
- DEFINITION MODULE SACSET;
-
-
- FROM MASSTOR IMPORT LIST;
-
-
- PROCEDURE LBIBMS(L: LIST): LIST;
- (*List of beta-integers bubble-merge sort. L is an arbitrary list of
- beta-integers, possibly with repetitions. M is the result of sorting
- L into non-decreasing order. A combination of bubble-sort and merge-
- sort is used. The list L is modified to produce M.*)
-
-
- PROCEDURE LBIBS(L: LIST);
- (*List of beta-integers bubble sort. L is an arbitrary list of
- beta-integers, with possible repetitions. L is sorted into
- non-decreasing order by the bubble-sort method. The list L, though not
- its location, is modified.*)
-
-
- PROCEDURE LBIM(L1,L2: LIST): LIST;
- (*List of beta-integers merge. L1 and L2 are arbitrary lists of
- beta-integers in non-decreasing order. L is the merge of L1 and L2.
- L1 and L2 are modified to produce L.*)
-
-
- PROCEDURE SCOMP(AL,L: LIST): LIST;
- (*Set composition. a is a beta-integer, L is a set of beta-integers.
- LP is the union of SET(a) and L. *)
-
-
- PROCEDURE SDIFF(A,B: LIST): LIST;
- (*Set difference. A and B are sets of beta-integers. C=A-B.*)
-
-
- PROCEDURE SINTER(A,B: LIST): LIST;
- (*Set intersection. A and B are sets of beta-integers. C is the
- intersection of A and B.*)
-
-
- PROCEDURE SUNION(A,B: LIST): LIST;
- (*Set union. A and B are sets of beta-integers. C is the union of
- A and B.*)
-
-
- PROCEDURE USCOMP(AL,L: LIST): LIST;
- (*Unordered set composition. a is an object, L is an unordered set.
- LP is the union of SET(a) and L. *)
-
-
- PROCEDURE USDIFF(A,B: LIST): LIST;
- (*Unordered set difference. A and B are unordered sets. C is the
- difference A-B.*)
-
-
- PROCEDURE USINT(A,B: LIST): LIST;
- (*Unordered set intersection. A and B are unordered sets. C is the
- intersection of A and B.*)
-
-
- PROCEDURE USUN(A,B: LIST): LIST;
- (*Unordered set union. A and B are unordered sets. C is the union
- of A and B.*)
-
-
- END SACSET.
-
-
-