Class Lehmer

java.lang.Object
org.gsusers.gsmv.utilities.Lehmer

public class Lehmer extends Object
Method to generate deterministic, "non"-repetitive sequence of digits using the Lehmer Random Number generator, (https://en.wikipedia.org/wiki/Lehmer_random_number_generator, ZX81) The purpose is to introduce a reliable one-digit signature to synthetic data sets at the least significant digit. Depending on the Lehmer result, it will either add or subtract one unit, so that the data is even, when the Lehmer number is even, resp. vice verso. Lehmer is used in SynthGroups.saveDataFile and AnaGroups.saveAll. There are five methods: 1. Generation and initialization, when the class is first called, 2. an Iteration step adjusting each generated simulated data item, 3. Test, counts the number of times the signature is violated, 4. Summarize, exports the total number of items and signature violations. 5. Even, a boolean based on Lehmer's method
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Lehmer(int _min, int _max)
    Constructor for the case of integer scores Generation and initialization, when the class is first called
    Lehmer(Double _dMin, Double _dMax)
    Constructor for the case of Double scores Generation and initialization, when the class is first called
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    adjust(int data_raw)
    Iteration step adjusting each generated simulated data item according to the current random number
    Summarize, exports the total number of signature violations
    void
    Test(Double data)
    Test, counts the number of times the signature is violated

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Lehmer

      public Lehmer(int _min, int _max)
      Constructor for the case of integer scores Generation and initialization, when the class is first called
      Parameters:
      _min - int, lowest possible value
      _max - int, highest possible value
    • Lehmer

      public Lehmer(Double _dMin, Double _dMax)
      Constructor for the case of Double scores Generation and initialization, when the class is first called
      Parameters:
      _dMin - Double, lowest possible value
      _dMax - Double, highest possible value
  • Method Details

    • adjust

      public int adjust(int data_raw)
      Iteration step adjusting each generated simulated data item according to the current random number
      Parameters:
      data_raw - int input score
      Returns:
      int adjusted output score
    • Summarize

      public Integer Summarize()
      Summarize, exports the total number of signature violations
      Returns:
      Integer number of violations
    • Test

      public void Test(Double data)
      Test, counts the number of times the signature is violated
      Parameters:
      data - Double current score