パッケージ jp.soars.utils.random

インタフェース ICRandom

すべてのスーパーインタフェース:
Serializable
既知の実装クラスのリスト:
TCAbstractRandom, TCJava48BitLcg

public interface ICRandom extends Serializable
A (pseudo) random number generator.
導入されたバージョン:
2
作成者:
hmkz
  • メソッドの概要

    修飾子とタイプ
    メソッド
    説明
    <T> List<T>
    chooseWithoutReplacement(List<T> list, int n)
    非復元抽出.
    <T> List<T>
    chooseWithoutReplacement(Set<T> set, int n)
    非復元抽出.
    <T> List<T>
    非復元抽出.
    <T> List<T>
    chooseWithReplacement(List<T> list, int n)
    復元抽出.
    <T> List<T>
    chooseWithReplacement(Set<T> set, int n)
    復元抽出.
    void
    fill(boolean[] buf)
    Fills the specified array buf with random numbers.
    void
    fill(boolean[] buf, double pTrue)
    Fills the specified array buf with random numbers.
    void
    fill(byte[] buf)
    Fills the specified array buf with random numbers.
    void
    fill(byte[] buf, byte n)
    Fills the specified array buf with random numbers.
    void
    fill(byte[] buf, byte min, byte max)
    Fills the specified array buf with random numbers.
    void
    fill(char[] buf)
    Fills the specified array buf with random numbers.
    void
    fill(char[] buf, char n)
    Fills the specified array buf with random numbers.
    void
    fill(char[] buf, char min, char max)
    Fills the specified array buf with random numbers.
    void
    fill(double[] buf)
    Fills the specified array buf with random numbers.
    void
    fill(double[] buf, double sup)
    Fills the specified array buf with random numbers.
    void
    fill(double[] buf, double min, double max)
    Fills the specified array buf with random numbers.
    void
    fill(float[] buf)
    Fills the specified array buf with random numbers.
    void
    fill(float[] buf, float sup)
    Fills the specified array buf with random numbers.
    void
    fill(float[] buf, float min, float max)
    Fills the specified array buf with random numbers.
    void
    fill(int[] buf)
    Fills the specified array buf with random numbers.
    void
    fill(int[] buf, int n)
    Fills the specified array buf with random numbers.
    void
    fill(int[] buf, int min, int max)
    Fills the specified array buf with random numbers.
    void
    fill(long[] buf)
    Fills the specified array buf with random numbers.
    void
    fill(long[] buf, long n)
    Fills the specified array buf with random numbers.
    void
    fill(long[] buf, long min, long max)
    Fills the specified array buf with random numbers.
    void
    fill(short[] buf)
    Fills the specified array buf with random numbers.
    void
    fill(short[] buf, short n)
    Fills the specified array buf with random numbers.
    void
    fill(short[] buf, short min, short max)
    Fills the specified array buf with random numbers.
    long
    シード値を返す.
    boolean
    Returns a boolean value uniformly distributed on the range of boolean using the next value of the random number sequence in this object.
    boolean
    nextBoolean(double pTrue)
    Returns a boolean value distributed on the range of boolean using the next value of the random number sequence in this object.
    byte
    Returns a byte value uniformly distributed on the range of byte using the next value of the random number sequence in this object.
    byte
    nextByte(byte n)
    Returns a byte value uniformly distributed on the closed interval [0, n-1] using the next value of the random number sequence in this object.
    byte
    nextByte(byte min, byte max)
    Returns a byte value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
    char
    Returns a char value uniformly distributed on the range of char using the next value of the random number sequence in this object.
    char
    nextChar(char n)
    Returns a char value uniformly distributed on the closed interval [0, n-1] using the next value of the random number sequence in this object.
    char
    nextChar(char min, char max)
    Returns a char value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
    double
    Returns a double value uniformly distributed on the closed-open interval [0.0d, 1.0d) using the next value of the random number sequence in this object.
    double
    nextDouble(double sup)
    Returns a double value uniformly distributed on the closed-open interval [0.0d, sup) using the next value of the random number sequence in this object.
    double
    nextDouble(double min, double max)
    Returns a double value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
    float
    Returns a float value uniformly distributed on the closed-open interval [0.0f, 1.0f) using the next value of the random number sequence in this object.
    float
    nextFloat(float sup)
    Returns a float value uniformly distributed on the closed-open interval [0.0f, sup) using the next value of the random number sequence in this object.
    float
    nextFloat(float min, float max)
    Returns a float value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
    double
    Returns a double value on the standard Gaussian distribution (i.e. its mean is 0 and standard deviation is 1).
    double
    nextGaussian(double mu, double sigma)
    Returns a double value on the Gaussian distribution with the specified parameters; mu and sigma.
    int
    Returns an int value uniformly distributed on the range of int using the next value of the random number sequence in this object.
    int
    nextInt(int n)
    Returns an int value uniformly distributed on the closed interval [0, n-1] using the next value of the random number sequence in this object.
    int
    nextInt(int min, int max)
    Returns an int value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
    long
    Returns a long value uniformly distributed on the range of long using the next value of the random number sequence in this object.
    long
    nextLong(long n)
    Returns a long value uniformly distributed on the closed interval [0, n-1] using the next value of the random number sequence in this object.
    long
    nextLong(long min, long max)
    Returns a long value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
    short
    Returns a short value uniformly distributed on the range of short using the next value of the random number sequence in this object.
    short
    nextShort(short n)
    Returns a short value uniformly distributed on the closed interval [0, n-1] using the next value of the random number sequence in this object.
    short
    nextShort(short min, short max)
    Returns a short value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
    void
    setSeed(long seed)
    Sets the seed of random number sequence.
    void
    shuffle(boolean[] a)
    Shuffles the specified array a destructively.
    void
    shuffle(boolean[] a, int n)
    Shuffles the first n elements in the specified array a destructively.
    void
    shuffle(boolean[] a, int begin, int end)
    Shuffles the elements of the specified array a placed between begin and end destructively.
    void
    shuffle(byte[] a)
    Shuffles the specified array a destructively.
    void
    shuffle(byte[] a, int n)
    Shuffles the first n elements in the specified array a destructively.
    void
    shuffle(byte[] a, int begin, int end)
    Shuffles the elements of the specified array a placed between begin and end destructively.
    void
    shuffle(char[] a)
    Shuffles the specified array a destructively.
    void
    shuffle(char[] a, int n)
    Shuffles the first n elements in the specified array a destructively.
    void
    shuffle(char[] a, int begin, int end)
    Shuffles the elements of the specified array a placed between begin and end destructively.
    void
    shuffle(double[] a)
    Shuffles the specified array a destructively.
    void
    shuffle(double[] a, int n)
    Shuffles the first n elements in the specified array a destructively.
    void
    shuffle(double[] a, int begin, int end)
    Shuffles the elements of the specified array a placed between begin and end destructively.
    void
    shuffle(float[] a)
    Shuffles the specified array a destructively.
    void
    shuffle(float[] a, int n)
    Shuffles the first n elements in the specified array a destructively.
    void
    shuffle(float[] a, int begin, int end)
    Shuffles the elements of the specified array a placed between begin and end destructively.
    void
    shuffle(int[] a)
    Shuffles the specified array a destructively.
    void
    shuffle(int[] a, int n)
    Shuffles the first n elements in the specified array a destructively.
    void
    shuffle(int[] a, int begin, int end)
    Shuffles the elements of the specified array a placed between begin and end destructively.
    void
    shuffle(long[] a)
    Shuffles the specified array a destructively.
    void
    shuffle(long[] a, int n)
    Shuffles the first n elements in the specified array a destructively.
    void
    shuffle(long[] a, int begin, int end)
    Shuffles the elements of the specified array a placed between begin and end destructively.
    void
    shuffle(short[] a)
    Shuffles the specified array a destructively.
    void
    shuffle(short[] a, int n)
    Shuffles the first n elements in the specified array a destructively.
    void
    shuffle(short[] a, int begin, int end)
    Shuffles the elements of the specified array a placed between begin and end destructively.
    void
    Shuffles the specified array a destructively.
    void
    shuffle(Object[] a, int n)
    Shuffles the first n elements in the specified array a destructively.
    void
    shuffle(Object[] a, int begin, int end)
    Shuffles the elements of the specified array a placed between begin and end destructively.
    void
    shuffle(List<?> list, int n)
    Shuffles the first n elements in the specified list destructively.
    void
    shuffle(List<?> list, int begin, int end)
    Shuffles the elements of the specified list placed between begin and end destructively.
    <T> List<T>
    shuffle(List<T> list)
    リストをシャッフルする.
    <T> List<T>
    リストをシャッフルする.
  • メソッドの詳細

    • setSeed

      void setSeed(long seed)
      Sets the seed of random number sequence.
      パラメータ:
      seed -
      導入されたバージョン:
      2 hmkz
    • getSeed

      long getSeed()
      シード値を返す.
      戻り値:
      シード値
    • nextBoolean

      boolean nextBoolean()
      Returns a boolean value uniformly distributed on the range of boolean using the next value of the random number sequence in this object.
      戻り値:
      a random boolean value
      導入されたバージョン:
      2 hmkz
    • nextBoolean

      boolean nextBoolean(double pTrue)
      Returns a boolean value distributed on the range of boolean using the next value of the random number sequence in this object. The probability to return true and false is (approximately) pTrue and 1 - pTrue, respectively. We necessarily ensure the following two conditions;
      • if pTrue >= 1.0d, then true is always returned.
      • if pTrue <= 0.0d, then false is always returned.
      パラメータ:
      pTrue - the probability to return true
      戻り値:
      a random boolean value
      導入されたバージョン:
      30 hmkz
    • nextChar

      char nextChar()
      Returns a char value uniformly distributed on the range of char using the next value of the random number sequence in this object.
      戻り値:
      a random char value
      導入されたバージョン:
      27 hmkz
    • nextChar

      char nextChar(char n)
      Returns a char value uniformly distributed on the closed interval [0, n-1] using the next value of the random number sequence in this object.
      パラメータ:
      n - the number of possible values
      戻り値:
      a random char value
      導入されたバージョン:
      27 hmkz
    • nextChar

      char nextChar(char min, char max)
      Returns a char value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
      パラメータ:
      min - the possible minimum value to be returned
      max - the possible maximum value to be returned
      戻り値:
      a random char value
      導入されたバージョン:
      27 hmkz
    • nextByte

      byte nextByte()
      Returns a byte value uniformly distributed on the range of byte using the next value of the random number sequence in this object.
      戻り値:
      a random byte value
      導入されたバージョン:
      27 hmkz
    • nextByte

      byte nextByte(byte n)
      Returns a byte value uniformly distributed on the closed interval [0, n-1] using the next value of the random number sequence in this object.
      パラメータ:
      n - the number of possible values
      戻り値:
      a random byte value
      導入されたバージョン:
      27 hmkz
    • nextByte

      byte nextByte(byte min, byte max)
      Returns a byte value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
      パラメータ:
      min - the possible minimum value to be returned
      max - the possible maximum value to be returned
      戻り値:
      a random byte value
      導入されたバージョン:
      27 hmkz
    • nextShort

      short nextShort()
      Returns a short value uniformly distributed on the range of short using the next value of the random number sequence in this object.
      戻り値:
      a random short value
      導入されたバージョン:
      27 hmkz
    • nextShort

      short nextShort(short n)
      Returns a short value uniformly distributed on the closed interval [0, n-1] using the next value of the random number sequence in this object.
      パラメータ:
      n - the number of possible values
      戻り値:
      a random short value
      導入されたバージョン:
      27 hmkz
    • nextShort

      short nextShort(short min, short max)
      Returns a short value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
      パラメータ:
      min - the possible minimum value to be returned
      max - the possible maximum value to be returned
      戻り値:
      a random short value
      導入されたバージョン:
      27 hmkz
    • nextInt

      int nextInt()
      Returns an int value uniformly distributed on the range of int using the next value of the random number sequence in this object.
      戻り値:
      a random int value
      導入されたバージョン:
      2 hmkz
    • nextInt

      int nextInt(int n)
      Returns an int value uniformly distributed on the closed interval [0, n-1] using the next value of the random number sequence in this object.
      パラメータ:
      n - the number of possible values
      戻り値:
      a random int value
      導入されたバージョン:
      2 hmkz
    • nextInt

      int nextInt(int min, int max)
      Returns an int value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
      パラメータ:
      min - the possible minimum value to be returned
      max - the possible maximum value to be returned
      戻り値:
      a random int value
      導入されたバージョン:
      2 hmkz
    • nextLong

      long nextLong()
      Returns a long value uniformly distributed on the range of long using the next value of the random number sequence in this object.
      戻り値:
      a random long value
      導入されたバージョン:
      2 hmkz
    • nextLong

      long nextLong(long n)
      Returns a long value uniformly distributed on the closed interval [0, n-1] using the next value of the random number sequence in this object.
      パラメータ:
      n - the number of possible values
      戻り値:
      a random long value
      導入されたバージョン:
      2 hmkz
    • nextLong

      long nextLong(long min, long max)
      Returns a long value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
      パラメータ:
      min - the possible minimum value to be returned
      max - the possible maximum value to be returned
      戻り値:
      a random long value
      導入されたバージョン:
      2 hmkz
    • nextFloat

      float nextFloat()
      Returns a float value uniformly distributed on the closed-open interval [0.0f, 1.0f) using the next value of the random number sequence in this object.
      戻り値:
      a random float value
      導入されたバージョン:
      2 hmkz
    • nextFloat

      float nextFloat(float sup)
      Returns a float value uniformly distributed on the closed-open interval [0.0f, sup) using the next value of the random number sequence in this object.
      パラメータ:
      sup - the supremum of random numbers (exclusively)
      戻り値:
      a random float value
      導入されたバージョン:
      30 hmkz
    • nextFloat

      float nextFloat(float min, float max)
      Returns a float value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
      パラメータ:
      min - the possible minimum value to be returned
      max - the possible maximum value to be returned
      戻り値:
      a random float value
      導入されたバージョン:
      2 hmkz
    • nextDouble

      double nextDouble()
      Returns a double value uniformly distributed on the closed-open interval [0.0d, 1.0d) using the next value of the random number sequence in this object.
      戻り値:
      a random double value
      導入されたバージョン:
      2 hmkz
    • nextDouble

      double nextDouble(double sup)
      Returns a double value uniformly distributed on the closed-open interval [0.0d, sup) using the next value of the random number sequence in this object.
      パラメータ:
      sup - the supremum of random numbers (exclusively)
      戻り値:
      a random double value
      導入されたバージョン:
      30 hmkz
    • nextDouble

      double nextDouble(double min, double max)
      Returns a double value uniformly distributed on the closed interval [min, max] using the next value of the random number sequence in this object.
      パラメータ:
      min - the possible minimum value to be returned
      max - the possible maximum value to be returned
      戻り値:
      a random double value
      導入されたバージョン:
      2 hmkz
    • nextGaussian

      double nextGaussian()
      Returns a double value on the standard Gaussian distribution (i.e. its mean is 0 and standard deviation is 1).
      戻り値:
      a random double value
      導入されたバージョン:
      2 hmkz
    • nextGaussian

      double nextGaussian(double mu, double sigma)
      Returns a double value on the Gaussian distribution with the specified parameters; mu and sigma.
      パラメータ:
      mu - the mean of Gaussian distribution
      sigma - the standard deviation of Gaussian distribution (must be non-negative)
      戻り値:
      a random double value
      導入されたバージョン:
      2 hmkz
    • fill

      void fill(boolean[] buf)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the range of boolean.
      パラメータ:
      buf - a buffer to be filled with random numbers
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(boolean[] buf, double pTrue)
      Fills the specified array buf with random numbers. The random numbers are generated so that the probability to generate true and false is (approximately) pTrue and 1 - pTrue, respectively. We necessarily ensure the following two conditions;
      • if pTrue >= 1.0d, then all the elements of the resulting array buf are true.
      • if pTrue <= 0.0d, then all the elements of the resulting array buf are false.
      パラメータ:
      buf - a buffer to be filled with random numbers
      pTrue - the probability to generate true
      導入されたバージョン:
      30 hmkz
    • fill

      void fill(char[] buf)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the range of char.
      パラメータ:
      buf - a buffer to be filled with random numbers
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(char[] buf, char n)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [0, n-1].
      パラメータ:
      buf - a buffer to be filled with random numbers
      n - the number of possible values
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(char[] buf, char min, char max)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [min, max].
      パラメータ:
      buf - a buffer to be filled with random numbers
      min - the possible minimum value to be generated
      max - the possible maximum value to be generated
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(byte[] buf)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the range of byte.
      パラメータ:
      buf - a buffer to be filled with random numbers
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(byte[] buf, byte n)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [0, n-1].
      パラメータ:
      buf - a buffer to be filled with random numbers
      n - the number of possible values
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(byte[] buf, byte min, byte max)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [min, max].
      パラメータ:
      buf - a buffer to be filled with random numbers
      min - the possible minimum value to be generated
      max - the possible maximum value to be generated
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(short[] buf)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the range of short.
      パラメータ:
      buf - a buffer to be filled with random numbers
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(short[] buf, short n)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [0, n-1].
      パラメータ:
      buf - a buffer to be filled with random numbers
      n - the number of possible values
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(short[] buf, short min, short max)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [min, max].
      パラメータ:
      buf - a buffer to be filled with random numbers
      min - the possible minimum value to be generated
      max - the possible maximum value to be generated
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(int[] buf)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the range of int.
      パラメータ:
      buf - a buffer to be filled with random numbers
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(int[] buf, int n)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [0, n-1].
      パラメータ:
      buf - a buffer to be filled with random numbers
      n - the number of possible values
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(int[] buf, int min, int max)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [min, max].
      パラメータ:
      buf - a buffer to be filled with random numbers
      min - the possible minimum value to be generated
      max - the possible maximum value to be generated
      導入されたバージョン:
      2 hmkz
    • fill

      void fill(long[] buf)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the range of long.
      パラメータ:
      buf - a buffer to be filled with random numbers
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(long[] buf, long n)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [0, n-1].
      パラメータ:
      buf - a buffer to be filled with random numbers
      n - the number of possible values
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(long[] buf, long min, long max)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [min, max].
      パラメータ:
      buf - a buffer to be filled with random numbers
      min - the possible minimum value to be generated
      max - the possible maximum value to be generated
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(float[] buf)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed-open interval [0.0f, 1.0f).
      パラメータ:
      buf - a buffer to be filled with random numbers
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(float[] buf, float sup)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed-open interval [0.0f, sup).
      パラメータ:
      buf - a buffer to be filled with random numbers
      sup - the supremum of random numbers (exclusively)
      導入されたバージョン:
      30 hmkz
    • fill

      void fill(float[] buf, float min, float max)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [min, max].
      パラメータ:
      buf - a buffer to be filled with random numbers
      min - the possible minimum value to be generated
      max - the possible maximum value to be generated
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(double[] buf)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed-open interval [0.0d, 1.0d).
      パラメータ:
      buf - a buffer to be filled with random numbers
      導入されたバージョン:
      27 hmkz
    • fill

      void fill(double[] buf, double sup)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed-open interval [0.0d, sup).
      パラメータ:
      buf - a buffer to be filled with random numbers
      sup - the supremum of random numbers (exclusively)
      導入されたバージョン:
      30 hmkz
    • fill

      void fill(double[] buf, double min, double max)
      Fills the specified array buf with random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval [min, max].
      パラメータ:
      buf - a buffer to be filled with random numbers
      min - the possible minimum value to be generated
      max - the possible maximum value to be generated
      導入されたバージョン:
      2 hmkz
    • shuffle

      void shuffle(boolean[] a)
      Shuffles the specified array a destructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given array a .
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(boolean[] a, int n)
      Shuffles the first n elements in the specified array a destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the first n elements' is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      n - the number of elements to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(boolean[] a, int begin, int end)
      Shuffles the elements of the specified array a placed between begin and end destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the elements' between begin and end is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      begin - the index of the first element to be shuffled
      end - the index of the last element to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(char[] a)
      Shuffles the specified array a destructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given array a .
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(char[] a, int n)
      Shuffles the first n elements in the specified array a destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the first n elements' is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      n - the number of elements to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(char[] a, int begin, int end)
      Shuffles the elements of the specified array a placed between begin and end destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the elements' between begin and end is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      begin - the index of the first element to be shuffled
      end - the index of the last element to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(byte[] a)
      Shuffles the specified array a destructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given array a .
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(byte[] a, int n)
      Shuffles the first n elements in the specified array a destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the first n elements' is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      n - the number of elements to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(byte[] a, int begin, int end)
      Shuffles the elements of the specified array a placed between begin and end destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the elements' between begin and end is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      begin - the index of the first element to be shuffled
      end - the index of the last element to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(short[] a)
      Shuffles the specified array a destructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given array a .
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(short[] a, int n)
      Shuffles the first n elements in the specified array a destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the first n elements' is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      n - the number of elements to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(short[] a, int begin, int end)
      Shuffles the elements of the specified array a placed between begin and end destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the elements' between begin and end is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      begin - the index of the first element to be shuffled
      end - the index of the last element to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(int[] a)
      Shuffles the specified array a destructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given array a .
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      導入されたバージョン:
      2 hmkz
    • shuffle

      void shuffle(int[] a, int n)
      Shuffles the first n elements in the specified array a destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the first n elements' is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      n - the number of elements to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(int[] a, int begin, int end)
      Shuffles the elements of the specified array a placed between begin and end destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the elements' between begin and end is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      begin - the index of the first element to be shuffled
      end - the index of the last element to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(long[] a)
      Shuffles the specified array a destructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given array a .
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(long[] a, int n)
      Shuffles the first n elements in the specified array a destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the first n elements' is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      n - the number of elements to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(long[] a, int begin, int end)
      Shuffles the elements of the specified array a placed between begin and end destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the elements' between begin and end is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      begin - the index of the first element to be shuffled
      end - the index of the last element to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(float[] a)
      Shuffles the specified array a destructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given array a .
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(float[] a, int n)
      Shuffles the first n elements in the specified array a destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the first n elements' is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      n - the number of elements to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(float[] a, int begin, int end)
      Shuffles the elements of the specified array a placed between begin and end destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the elements' between begin and end is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      begin - the index of the first element to be shuffled
      end - the index of the last element to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(double[] a)
      Shuffles the specified array a destructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given array a .
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      導入されたバージョン:
      2 hmkz
    • shuffle

      void shuffle(double[] a, int n)
      Shuffles the first n elements in the specified array a destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the first n elements' is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      n - the number of elements to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(double[] a, int begin, int end)
      Shuffles the elements of the specified array a placed between begin and end destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the elements' between begin and end is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      begin - the index of the first element to be shuffled
      end - the index of the last element to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(Object[] a)
      Shuffles the specified array a destructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given array a .
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(Object[] a, int n)
      Shuffles the first n elements in the specified array a destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the first n elements' is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      n - the number of elements to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(Object[] a, int begin, int end)
      Shuffles the elements of the specified array a placed between begin and end destructively. For any given array a, the order of the elements in the resulting array are guaranteed that the elements' between begin and end is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      a - an array to be shuffled. The resulting array is returned by overwriting this array
      begin - the index of the first element to be shuffled
      end - the index of the last element to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(List<?> list, int n)
      Shuffles the first n elements in the specified list destructively. For any given list list, the order of the elements in the resulting list are guaranteed that the first n elements' is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      list - a list to be shuffled. The resulting list is returned by overwriting this list
      n - the number of elements to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      void shuffle(List<?> list, int begin, int end)
      Shuffles the elements of the specified list placed between begin and end destructively. For any given list list, the order of the elements in the resulting list are guaranteed that the elements' between begin and end is (approximately) uniform-random and the others' equals to the original's.
      パラメータ:
      list - a list to be shuffled. The resulting list is returned by overwriting this list
      begin - the index of the first element to be shuffled
      end - the index of the last element to be shuffled
      導入されたバージョン:
      27 hmkz
    • shuffle

      <T> List<T> shuffle(List<T> list)
      リストをシャッフルする.
      型パラメータ:
      T - リスト内のオブジェクトのクラス
      パラメータ:
      list - リスト
      戻り値:
      シャッフル後のリスト
    • shuffleWithoutCopy

      <T> List<T> shuffleWithoutCopy(List<T> list)
      リストをシャッフルする. 元のリストに破壊的操作を行う.
      型パラメータ:
      T - リスト内のオブジェクトのクラス
      パラメータ:
      list - リスト
      戻り値:
      シャッフル後のリスト
    • chooseWithReplacement

      <T> List<T> chooseWithReplacement(List<T> list, int n)
      復元抽出.
      型パラメータ:
      T - リスト内のオブジェクトのクラス
      パラメータ:
      list - リスト
      n - 抽出数
      戻り値:
      復元抽出リスト
    • chooseWithReplacement

      <T> List<T> chooseWithReplacement(Set<T> set, int n)
      復元抽出.
      型パラメータ:
      T - セット内のオブジェクトのクラス
      パラメータ:
      set - セット
      n - 抽出数
      戻り値:
      復元抽出リスト
    • chooseWithoutReplacement

      <T> List<T> chooseWithoutReplacement(List<T> list, int n)
      非復元抽出.
      型パラメータ:
      T - リスト内のオブジェクトのクラス
      パラメータ:
      list - リスト
      n - 抽出数
      戻り値:
      非復元抽出リスト
    • chooseWithoutReplacement

      <T> List<T> chooseWithoutReplacement(Set<T> set, int n)
      非復元抽出.
      型パラメータ:
      T - セット内のオブジェクトのクラス
      パラメータ:
      set - セット
      n - 抽出数
      戻り値:
      非復元抽出リスト
    • chooseWithoutReplacementWithoutCopy

      <T> List<T> chooseWithoutReplacementWithoutCopy(List<T> list, int n)
      非復元抽出. 元のリストに破壊的操作を行う.
      型パラメータ:
      T - リスト内のオブジェクトのクラス
      パラメータ:
      list - リスト
      n - 抽出数
      戻り値:
      非復元抽出リスト