home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / misc / mas / mashelp / sacset.def < prev    next >
Encoding:
Modula Definition  |  1989-10-08  |  1.9 KB  |  72 lines

  1.  
  2. (* SAC Set definition module. *)
  3.  
  4. DEFINITION MODULE SACSET;
  5.  
  6.  
  7. FROM MASSTOR IMPORT LIST;
  8.  
  9.  
  10. PROCEDURE LBIBMS(L: LIST): LIST;
  11. (*List of beta-integers bubble-merge sort.  L is an arbitrary list of
  12. beta-integers, possibly with repetitions.  M is the result of sorting
  13. L into non-decreasing order.  A combination of bubble-sort and merge-
  14. sort is used.  The list L is modified to produce M.*)
  15.  
  16.  
  17. PROCEDURE LBIBS(L: LIST);
  18. (*List of beta-integers bubble sort.  L is an arbitrary list of
  19. beta-integers, with possible repetitions.  L is sorted into
  20. non-decreasing order by the bubble-sort method.  The list L, though not
  21. its location, is modified.*)
  22.  
  23.  
  24. PROCEDURE LBIM(L1,L2: LIST): LIST;
  25. (*List of beta-integers merge.  L1 and L2 are arbitrary lists of
  26. beta-integers in non-decreasing order.  L is the merge of L1 and L2.
  27. L1 and L2 are modified to produce L.*)
  28.  
  29.  
  30. PROCEDURE SCOMP(AL,L: LIST): LIST;
  31. (*Set composition. a is a beta-integer, L is a set of beta-integers.
  32. LP is the union of SET(a) and L. *)
  33.  
  34.  
  35. PROCEDURE SDIFF(A,B: LIST): LIST;
  36. (*Set difference.  A and B are sets of beta-integers.  C=A-B.*)
  37.  
  38.  
  39. PROCEDURE SINTER(A,B: LIST): LIST;
  40. (*Set intersection.  A and B are sets of beta-integers.  C is the
  41. intersection of A and B.*)
  42.  
  43.  
  44. PROCEDURE SUNION(A,B: LIST): LIST;
  45. (*Set union.  A and B are sets of beta-integers.  C is the union of
  46. A and B.*)
  47.  
  48.  
  49. PROCEDURE USCOMP(AL,L: LIST): LIST;
  50. (*Unordered set composition. a is an object, L is an unordered set.
  51. LP is the union of SET(a) and L. *)
  52.  
  53.  
  54. PROCEDURE USDIFF(A,B: LIST): LIST;
  55. (*Unordered set difference.  A and B are unordered sets.  C is the
  56. difference A-B.*)
  57.  
  58.  
  59. PROCEDURE USINT(A,B: LIST): LIST;
  60. (*Unordered set intersection.  A and B are unordered sets.  C is the
  61. intersection of A and B.*)
  62.  
  63.  
  64. PROCEDURE USUN(A,B: LIST): LIST;
  65. (*Unordered set union.  A and B are unordered sets.  C is the union
  66. of A and B.*)
  67.  
  68.  
  69. END SACSET.
  70.  
  71.  
  72.