Sage-ST ä

Newsets

Documentation

CondInclude EmptySet Exclude GetBitPosition
HighIndex In Include Included
SetDifference SetIntersect SetIntersection SetPopulation
SetSize SetSymmetricDifference SetToCompliment SetToEmpty
SetToFull SetUnion




  function SetSize
             (const totalElements : cardinal) : cardinal; stdcall;

  exports SetSize name 'NewSets_SetSize';

  //*
  //  SetSize - Return number of bitsets required for a set.
  //
  //
  //  This routine returns the number of bitsets required to contain
  //  a set with the specified number of elements.
  //
  //  CALLING SEQUENCE -
  //
  //    numberOfBitsets := SetSize (maxElement);
  //
  //  ENTRY -
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    numberOfBitsets : cardinal
  //      The number of bitsets required for this set.
  //




  function HighIndex
             (const totalElements : cardinal) : cardinal; stdcall;

  exports HighIndex name 'NewSets_HighIndex';

  //*
  //  HighIndex - Return the highest index number for a set;.
  //
  //
  //  This routine returns index number of the higest bitset for
  //  a set containing the specified number of elements.
  //
  //  CALLING SEQUENCE -
  //
  //    highIndex := SetSize (maxElement);
  //
  //  ENTRY -
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    highIndex : cardinal
  //      The high index of this set.
  //




  procedure GetBitPosition
             (const Pos     : cardinal;
              var   TheWord : cardinal;
              var   bit     : cardinal); stdcall;

  exports GetBitPosition name 'NewSets_GetBitPosition';

  //*
  //  GetBitPosition - Return the word and bit of a set element.
  //
  //
  //  This routine returns the word and bit position of a specified
  //  set element.
  //
  //  CALLING SEQUENCE -
  //
  //    GetBitPosition (Pos, TheWord, Bit)
  //
  //  ENTRY -
  //
  //    Pos : cardinal
  //      The set element to be located.
  //
  //  EXIT -
  //
  //    TheWord : cardinal
  //      The word position of the specified set element.
  //
  //    Bit : cardinal
  //      The bit position of the word containing the
  //      specified element.
  //




  function BitIn
             (const TheSet  : array of ModSys.BitSet;
              const TheWord : cardinal;
              const bit     : cardinal) : boolean; stdcall;

  exports BitIn name 'NewSets_BitIn';

  //*
  //  BitIn - Check to see if a bit is in a bitset.
  //
  //
  //  This routine checks to see if a bit is in a particular word of
  //  an array of BitSet.
  //
  //  CALLING SEQUENCE -
  //
  //    Test := BitIn (TheSet, Bit, TheWord)
  //
  //  ENTRY -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    TheWord : cardinal
  //      The Word of the set TheSet to be tested.
  //
  //    Bit : cardinal
  //      The bit of the word in the set TheSet to be tested.
  //
  //  EXIT -
  //
  //    Test : boolean
  //      True if the element is in the set.
  //




  function Included
             (const TheSet : array of ModSys.BitSet;
              const bit    : cardinal) : boolean; stdcall;

  exports Included name 'NewSets_Included';

  //*
  //  Included - Check to see if an element is in a set.
  //
  //
  //  This routine performs the equivalent of an 'IN' set operation
  //  for a general set of bitsets.
  //
  //  CALLING SEQUENCE -
  //
  //    Test := Included (TheSet, Bit)
  //
  //  ENTRY -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    Bit : cardinal
  //      The set element to be tested in the set S.
  //
  //  EXIT -
  //
  //    Test : boolean
  //      True if the element is in the set.
  //




  procedure Include
             (var   TheSet : array of ModSys.BitSet;
              const bit    : cardinal); stdcall;

  exports Include name 'NewSets_Include';

  //*
  //  Include - Include an element in a set.
  //
  //
  //  This routine performs the equivalent of an 'INCL' set operation
  //  for a general set of bitsets.  This adds the element to the set.
  //
  //  CALLING SEQUENCE -
  //
  //    Include (TheSet, Bit)
  //
  //  ENTRY -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    Bit : cardinal
  //      The set element to be included in the set S.
  //
  //  EXIT -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the updated set.
  //




  procedure CondInclude
             (var   TheSet : array of ModSys.BitSet;
              const bit    : cardinal;
              var   SetIt  : boolean); stdcall;

  exports CondInclude name 'NewSets_CondInclude';

  //*
  //  CondInclude - Conditionally include an element in a set.
  //
  //
  //  This routine performs the equivalent of an 'INCL' set operation
  //  for a general set of bitsets.  This adds the element to the set
  //  only if the bit is not currently set.  A flag is returned False
  //  if the bit was already set.
  //
  //  CALLING SEQUENCE -
  //
  //    CondInclude (TheSet, Bit, SetIt)
  //
  //  ENTRY -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    Bit : cardinal
  //      The set element to be included in the set S.
  //
  //  EXIT -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the updated set.
  //
  //    SetIt : boolean
  //      True if the bit was not previously set.
  //




  procedure Exclude
             (var   TheSet : array of ModSys.BitSet;
              const bit    : cardinal); stdcall;

  exports Exclude name 'NewSets_Exclude';

  //*
  //  Exclude - Exclude an element from a set.
  //
  //
  //  This routine performs the equivalent of an 'EXCL' set operation
  //  for a general set of bitsets.  This removes the element from the set.
  //
  //  CALLING SEQUENCE -
  //
  //    Exclude (TheSet, Bit)
  //
  //  ENTRY -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    Bit : cardinal
  //      The set element to be excluded from the set S.
  //
  //  EXIT -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the updated set.
  //




  procedure SetToEmpty
             (var   TheSet        : array of ModSys.BitSet;
              const totalElements : cardinal); stdcall;

  exports SetToEmpty name 'NewSets_SetToEmpty';

  //*
  //  SetToEmpty - Generate an empty set.
  //
  //
  //  This routine clears a set represented by an array of BitSetS
  //  to the empty set.
  //
  //  CALLING SEQUENCE -
  //
  //    SetToEmpty (TheSet, totalElements)
  //
  //  ENTRY -
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the empty set;
  //




  procedure SetToFull
             (var   TheSet        : array of ModSys.BitSet;
              const totalElements : cardinal); stdcall;

  exports SetToFull name 'NewSets_SetToFull';

  //*
  //  SetToFull - Generate a full set.
  //
  //
  //  This routine fills a set represented by an array of BitSetS.
  //
  //  CALLING SEQUENCE -
  //
  //    SetToFull (TheSet, totalElements)
  //
  //  ENTRY -
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the universe set;
  //




  procedure SetToCompliment
             (const TheSetIn      : array of ModSys.BitSet;
              var   TheSetOut     : array of ModSys.BitSet;
              const totalElements : cardinal); stdcall;

  exports SetToCompliment name 'NewSets_SetToCompliment';

  //*
  //  SetToCompliment - Set a set to the compliment of another.
  //
  //
  //  This routine compliments a set represented by an array
  //  of BitSetS.
  //
  //  CALLING SEQUENCE -
  //
  //    SetToCompliment (TheSetIn, R, totalElements)
  //
  //  ENTRY -
  //
  //    TheSetIn : Array of Modsys.bitset
  //      The set to be complimented.
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    R : Array of Modsys.bitset
  //      An array of bitsets representing the complimented set;
  //




  function EmptySet
             (const TheSet        : array of ModSys.BitSet;
              const totalElements : cardinal) : boolean; stdcall;

  exports EmptySet name 'NewSets_EmptySet';

  //*
  //  EmptySet - Test for an empty set.
  //
  //
  //  This routine tests a set to see if it is empty.
  //
  //  CALLING SEQUENCE -
  //
  //    Test := EmptySet (TheSet, totalElements)
  //
  //  ENTRY -
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the empty set;
  //




  function SetPopulation
             (var   TheSet        : array of ModSys.BitSet;
              const totalElements : cardinal) : cardinal; stdcall;

  exports SetPopulation name 'NewSets_SetPopulation';

  //*
  //  SetPopulation - Count the number of elements in a set.
  //
  //
  //  This routine returns the number of elements in a set.  If the
  //  set is empty then this routine returns zero.
  //
  //  CALLING SEQUENCE -
  //
  //    Knt := SetPopulation (TheSet, totalElements)
  //
  //  ENTRY -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the empty set;
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    Knt : cardinal
  //      The number of elements in the set.
  //




  procedure SetUnion
             (const S1            : array of ModSys.BitSet;
              const S2            : array of ModSys.BitSet;
              var   TheSet        : array of ModSys.BitSet;
              const totalElements : cardinal); stdcall;

  exports SetUnion name 'NewSets_SetUnion';

  //*
  //  SetUnion - Perform the union of two sets.
  //
  //
  //  This routine performs the equivalent of a union set operation
  //  for a general set of bitsets.  An element x is IN the set
  //  (S1 Union S2) iff (x IN S1) OR (x IN S2)
  //
  //  CALLING SEQUENCE -
  //
  //    SetUnion (S1, S2, TheSet, totalElements)
  //
  //  ENTRY -
  //
  //    S1 : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    S2 : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the set (S1 Union S2).
  //




  procedure SetDifference
             (const S1            : array of ModSys.BitSet;
              const S2            : array of ModSys.BitSet;
              var   TheSet        : array of ModSys.BitSet;
              const totalElements : cardinal); stdcall;

  exports SetDifference name 'NewSets_SetDifference';

  //*
  //  SetDifference - Perform the difference of two sets.
  //
  //
  //  This routine performs the equivalent of a difference set operation
  //  for a general set of bitsets.  An element x is IN the set
  //  (S1 Difference S2) iff (x IN S1) and NOT (x IN S2)
  //
  //  CALLING SEQUENCE -
  //
  //    SetDifference (S1, S2, TheSet, totalElements)
  //
  //  ENTRY -
  //
  //    S1 : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    S2 : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the set (S1 Difference S2).
  //




  procedure SetIntersection
             (const S1            : array of ModSys.BitSet;
              const S2            : array of ModSys.BitSet;
              var   TheSet        : array of ModSys.BitSet;
              const totalElements : cardinal); stdcall;

  exports SetIntersection name 'NewSets_SetIntersection';

  //*
  //  SetIntersection - Perform the intersection of two sets.
  //
  //
  //  This routine performs the equivalent of a intersection set operation
  //  for a general set of bitsets.  An element x is IN the set
  //  (S1 Intersection S2) iff (x IN S1) and (x IN S2)
  //
  //  CALLING SEQUENCE -
  //
  //    SetIntersection (S1, S2, TheSet, totalElements)
  //
  //  ENTRY -
  //
  //    S1 : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    S2 : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the set (S1 Intersection S2).
  //




  procedure SetSymmetricDifference
             (const S1            : array of ModSys.BitSet;
              const S2            : array of ModSys.BitSet;
              var   TheSet        : array of ModSys.BitSet;
              const totalElements : cardinal); stdcall;

  exports SetSymmetricDifference name 'NewSets_SetSymmetricDifference';

  //*
  //  SetSymmetricDifference - Perform the symmetric difference of two sets.
  //
  //
  //  This routine performs the equivalent of a symmetric difference set
  //  operation for a general set of bitsets.  An element x is IN the set
  //  (S1 SymmetricDifference S2) iff (x IN S1) # (x IN S2)
  //
  //  CALLING SEQUENCE -
  //
  //    SetSymmetricDifference (S1, S2, TheSet, totalElements)
  //
  //  ENTRY -
  //
  //    S1 : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    S2 : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the set
  //      (S1 SymmetricDifference S2).
  //




  function SetIntersect
             (const S1            : array of ModSys.BitSet;
              const S2            : array of ModSys.BitSet;
              var   TheSet        : array of ModSys.BitSet;
              const totalElements : cardinal) : boolean; stdcall;

  exports SetIntersect name 'NewSets_SetIntersect';

  //*
  //  SetIntersect - Perform the intersection of two sets.
  //
  //
  //  This routine performs the equivalent of a intersection set operation
  //  for a general set of bitsets.  An element x is IN the set
  //  (S1 Intersection S2) iff (x IN S1) and (x IN S2)
  //  This routine also returns a flag if the resulting set is empty.
  //
  //  CALLING SEQUENCE -
  //
  //    tst := SetIntersect (S1, S2, R, totalElements)
  //
  //  ENTRY -
  //
  //    S1 : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    S2 : Array of Modsys.bitset
  //      An array of bitsets representing the elements of a set.
  //
  //    totalElements : cardinal
  //      The total number of elements in the set.
  //
  //  EXIT -
  //
  //    tst : boolean
  //      A flag set to True if R is the empty set.
  //
  //    TheSet : Array of Modsys.bitset
  //      An array of bitsets representing the set (S1 Intersection S2).
  //




Send mail to   warren.merrill@inl.gov with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance