Class Gen

java.lang.Object
org.apache.jena.atlas.test.Gen

public class Gen extends Object
Support for testing. May be generally useful
  • Constructor Summary

    Constructors
    Constructor
    Description
    Gen()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int[]
    permute(int[] x)
    Pull items out of the list in a random order
    static int[]
    rand(int numRand, int low, int high)
    Generate a random sequence between low (inclusive) and high (exclusive): may include duplicates.
    static int[]
    rand(int numRand, int low, int high, boolean allDifferent)
    Generate a random sequence between low (inclusive) and high (exclusive) - with duplicates or not
    static int[]
    shuffle(int[] x, int num)
    Do a number of random pair-wise swaps
    static String
    strings(int[] keys)
     

    Methods inherited from class java.lang.Object

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

    • Gen

      public Gen()
  • Method Details

    • rand

      public static int[] rand(int numRand, int low, int high)
      Generate a random sequence between low (inclusive) and high (exclusive): may include duplicates.
    • rand

      public static int[] rand(int numRand, int low, int high, boolean allDifferent)
      Generate a random sequence between low (inclusive) and high (exclusive) - with duplicates or not
    • permute

      public static int[] permute(int[] x)
      Pull items out of the list in a random order
    • shuffle

      public static int[] shuffle(int[] x, int num)
      Do a number of random pair-wise swaps
    • strings

      public static String strings(int[] keys)