Class RandomReverser


  • @Internal
    public class RandomReverser
    extends java.lang.Object
    • Constructor Detail

      • RandomReverser

        @Internal
        public RandomReverser​(java.util.List<FilteredSkip> filteredSkips)
    • Method Detail

      • findAllValidSeeds

        public java.util.stream.LongStream findAllValidSeeds()
      • addUnmeasuredSeeds

        public void addUnmeasuredSeeds​(long numSeeds)
      • addNextIntCall

        public void addNextIntCall​(int n,
                                   int min,
                                   int max)
      • addNextIntCall

        public void addNextIntCall​(int min,
                                   int max)
      • consumeNextIntCalls

        public void consumeNextIntCalls​(int numCalls,
                                        int bound)
      • addNextBooleanCall

        public void addNextBooleanCall​(boolean value)
      • consumeNextBooleanCalls

        public void consumeNextBooleanCalls​(int numCalls)
      • addNextFloatCall

        public void addNextFloatCall​(float min,
                                     float max,
                                     boolean minInclusive,
                                     boolean maxInclusive)
        Add a constraint that min < / <= nextFloat() < / <= max, with strict inequalities when minInclusive or maxInclusive are false, respectively. As per the Java Random documentation min >= 0 and max < 1
        Parameters:
        min - low end of the valid range
        max - high end of the valid range
        minInclusive - true if the low end of the valid range should be inclusive
        maxInclusive - true if the high end of the valid range should be inclusive
      • addNextFloatCall

        public void addNextFloatCall​(float min,
                                     float max)
        Add a constraint that min <= nextFloat() < max.
        Parameters:
        min - low end of the valid range
        max - high end of the valid range
      • consumeNextFloatCalls

        public void consumeNextFloatCalls​(int numCalls)
      • addNextLongCall

        public void addNextLongCall​(long min,
                                    long max)
      • consumeNextLongCalls

        public void consumeNextLongCalls​(int numCalls)
      • addNextDoubleCall

        public void addNextDoubleCall​(double min,
                                      double max,
                                      boolean minInclusive,
                                      boolean maxInclusive)
        Add a constraint that min < / <= nextDouble() < / <= max, with strict inequalities when minInclusive or maxInclusive are false, respectively.
        Parameters:
        min - low end of the valid range
        max - high end of the valid range
        minInclusive - true if the low end of the valid range should be inclusive
        maxInclusive - true if the high end of the valid range should be inclusive
      • addNextDoubleCall

        public void addNextDoubleCall​(double min,
                                      double max)
        Add a constraint that min <= nextDouble() < max.
        Parameters:
        min - low end of the valid range
        max - high end of the valid range
      • consumeNextDoubleCalls

        public void consumeNextDoubleCalls​(int numCalls)
      • addModConstraint

        public void addModConstraint​(long min,
                                     long max,
                                     long newMod)
        Add a constraint on the seed modulo something special. There is no handling for specific java Random calls so to use this method requires investigating the implementation of the method one has periodic information on.
        Parameters:
        min - low end, inclusive, of the valid range of seeds
        max - high end, inclusive, of the valid range of seeds
        newMod - the alternate modulus to use.
      • setVerbose

        public void setVerbose​(boolean verbose)