Class VnExtractor

java.lang.Object
io.github.olyutorskii.aletojio.shrink.VnExtractor
All Implemented Interfaces:
RndInt32

public class VnExtractor extends Object implements RndInt32
Von Neumann randomness extractor (whitening).

Crunching input data by an average of 50% and improve output data randomness bias.

  • ...00... → ×
  • ...01... → 0
  • ...10... → 1
  • ...11... → ×

Random number output throughput decreases half.

See Also:
  • Constructor Details

  • Method Details

    • nextInt32

      public int nextInt32()
      Return next random number as 32bit int with random sign-bit.
      Specified by:
      nextInt32 in interface RndInt32
      Returns:
      random number