java.lang.Object
org.gsusers.gsmv.utilities.Lehmer
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 -
Method Summary
Modifier and TypeMethodDescriptionint
adjust
(int data_raw) Iteration step adjusting each generated simulated data item according to the current random numberSummarize, exports the total number of signature violationsvoid
Test, counts the number of times the signature is violated
-
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
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
Summarize, exports the total number of signature violations- Returns:
- Integer number of violations
-
Test
Test, counts the number of times the signature is violated- Parameters:
data
- Double current score
-