パッケージ jp.soars.utils.random
インタフェース ICRandom
- すべてのスーパーインタフェース:
Serializable
- 既知の実装クラスのリスト:
TCAbstractRandom,TCJava48BitLcg
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>chooseWithoutReplacementWithoutCopy(List<T> list, int n) 非復元抽出.<T> List<T>chooseWithReplacement(List<T> list, int n) 復元抽出.<T> List<T>chooseWithReplacement(Set<T> set, int n) 復元抽出.voidfill(boolean[] buf) Fills the specified arraybufwith random numbers.voidfill(boolean[] buf, double pTrue) Fills the specified arraybufwith random numbers.voidfill(byte[] buf) Fills the specified arraybufwith random numbers.voidfill(byte[] buf, byte n) Fills the specified arraybufwith random numbers.voidfill(byte[] buf, byte min, byte max) Fills the specified arraybufwith random numbers.voidfill(char[] buf) Fills the specified arraybufwith random numbers.voidfill(char[] buf, char n) Fills the specified arraybufwith random numbers.voidfill(char[] buf, char min, char max) Fills the specified arraybufwith random numbers.voidfill(double[] buf) Fills the specified arraybufwith random numbers.voidfill(double[] buf, double sup) Fills the specified arraybufwith random numbers.voidfill(double[] buf, double min, double max) Fills the specified arraybufwith random numbers.voidfill(float[] buf) Fills the specified arraybufwith random numbers.voidfill(float[] buf, float sup) Fills the specified arraybufwith random numbers.voidfill(float[] buf, float min, float max) Fills the specified arraybufwith random numbers.voidfill(int[] buf) Fills the specified arraybufwith random numbers.voidfill(int[] buf, int n) Fills the specified arraybufwith random numbers.voidfill(int[] buf, int min, int max) Fills the specified arraybufwith random numbers.voidfill(long[] buf) Fills the specified arraybufwith random numbers.voidfill(long[] buf, long n) Fills the specified arraybufwith random numbers.voidfill(long[] buf, long min, long max) Fills the specified arraybufwith random numbers.voidfill(short[] buf) Fills the specified arraybufwith random numbers.voidfill(short[] buf, short n) Fills the specified arraybufwith random numbers.voidfill(short[] buf, short min, short max) Fills the specified arraybufwith random numbers.longgetSeed()シード値を返す.booleanReturns abooleanvalue uniformly distributed on the range ofbooleanusing the next value of the random number sequence in this object.booleannextBoolean(double pTrue) Returns abooleanvalue distributed on the range ofbooleanusing the next value of the random number sequence in this object.bytenextByte()Returns abytevalue uniformly distributed on the range ofbyteusing the next value of the random number sequence in this object.bytenextByte(byte n) Returns abytevalue uniformly distributed on the closed interval[0, n-1]using the next value of the random number sequence in this object.bytenextByte(byte min, byte max) Returns abytevalue uniformly distributed on the closed interval[min, max]using the next value of the random number sequence in this object.charnextChar()Returns acharvalue uniformly distributed on the range ofcharusing the next value of the random number sequence in this object.charnextChar(char n) Returns acharvalue uniformly distributed on the closed interval[0, n-1]using the next value of the random number sequence in this object.charnextChar(char min, char max) Returns acharvalue uniformly distributed on the closed interval[min, max]using the next value of the random number sequence in this object.doubleReturns adoublevalue uniformly distributed on the closed-open interval[0.0d, 1.0d)using the next value of the random number sequence in this object.doublenextDouble(double sup) Returns adoublevalue uniformly distributed on the closed-open interval[0.0d, sup)using the next value of the random number sequence in this object.doublenextDouble(double min, double max) Returns adoublevalue uniformly distributed on the closed interval[min, max]using the next value of the random number sequence in this object.floatReturns afloatvalue uniformly distributed on the closed-open interval[0.0f, 1.0f)using the next value of the random number sequence in this object.floatnextFloat(float sup) Returns afloatvalue uniformly distributed on the closed-open interval[0.0f, sup)using the next value of the random number sequence in this object.floatnextFloat(float min, float max) Returns afloatvalue uniformly distributed on the closed interval[min, max]using the next value of the random number sequence in this object.doubleReturns adoublevalue on the standard Gaussian distribution (i.e. its mean is 0 and standard deviation is 1).doublenextGaussian(double mu, double sigma) Returns adoublevalue on the Gaussian distribution with the specified parameters;muandsigma.intnextInt()Returns anintvalue uniformly distributed on the range ofintusing the next value of the random number sequence in this object.intnextInt(int n) Returns anintvalue uniformly distributed on the closed interval[0, n-1]using the next value of the random number sequence in this object.intnextInt(int min, int max) Returns anintvalue uniformly distributed on the closed interval[min, max]using the next value of the random number sequence in this object.longnextLong()Returns alongvalue uniformly distributed on the range oflongusing the next value of the random number sequence in this object.longnextLong(long n) Returns alongvalue uniformly distributed on the closed interval[0, n-1]using the next value of the random number sequence in this object.longnextLong(long min, long max) Returns alongvalue uniformly distributed on the closed interval[min, max]using the next value of the random number sequence in this object.shortReturns ashortvalue uniformly distributed on the range ofshortusing the next value of the random number sequence in this object.shortnextShort(short n) Returns ashortvalue uniformly distributed on the closed interval[0, n-1]using the next value of the random number sequence in this object.shortnextShort(short min, short max) Returns ashortvalue uniformly distributed on the closed interval[min, max]using the next value of the random number sequence in this object.voidsetSeed(long seed) Sets the seed of random number sequence.voidshuffle(boolean[] a) Shuffles the specified arrayadestructively.voidshuffle(boolean[] a, int n) Shuffles the firstnelements in the specified arrayadestructively.voidshuffle(boolean[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively.voidshuffle(byte[] a) Shuffles the specified arrayadestructively.voidshuffle(byte[] a, int n) Shuffles the firstnelements in the specified arrayadestructively.voidshuffle(byte[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively.voidshuffle(char[] a) Shuffles the specified arrayadestructively.voidshuffle(char[] a, int n) Shuffles the firstnelements in the specified arrayadestructively.voidshuffle(char[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively.voidshuffle(double[] a) Shuffles the specified arrayadestructively.voidshuffle(double[] a, int n) Shuffles the firstnelements in the specified arrayadestructively.voidshuffle(double[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively.voidshuffle(float[] a) Shuffles the specified arrayadestructively.voidshuffle(float[] a, int n) Shuffles the firstnelements in the specified arrayadestructively.voidshuffle(float[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively.voidshuffle(int[] a) Shuffles the specified arrayadestructively.voidshuffle(int[] a, int n) Shuffles the firstnelements in the specified arrayadestructively.voidshuffle(int[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively.voidshuffle(long[] a) Shuffles the specified arrayadestructively.voidshuffle(long[] a, int n) Shuffles the firstnelements in the specified arrayadestructively.voidshuffle(long[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively.voidshuffle(short[] a) Shuffles the specified arrayadestructively.voidshuffle(short[] a, int n) Shuffles the firstnelements in the specified arrayadestructively.voidshuffle(short[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively.voidShuffles the specified arrayadestructively.voidShuffles the firstnelements in the specified arrayadestructively.voidShuffles the elements of the specified arrayaplaced betweenbeginandenddestructively.voidShuffles the firstnelements in the specified list destructively.voidShuffles the elements of the specified list placed betweenbeginandenddestructively.<T> List<T>リストをシャッフルする.<T> List<T>shuffleWithoutCopy(List<T> list) リストをシャッフルする.
-
メソッドの詳細
-
setSeed
void setSeed(long seed) Sets the seed of random number sequence.- パラメータ:
seed-- 導入されたバージョン:
- 2 hmkz
-
getSeed
long getSeed()シード値を返す.- 戻り値:
- シード値
-
nextBoolean
boolean nextBoolean()Returns abooleanvalue uniformly distributed on the range ofbooleanusing the next value of the random number sequence in this object.- 戻り値:
- a random
booleanvalue - 導入されたバージョン:
- 2 hmkz
-
nextBoolean
boolean nextBoolean(double pTrue) Returns abooleanvalue distributed on the range ofbooleanusing the next value of the random number sequence in this object. The probability to returntrueandfalseis (approximately)pTrueand1 - pTrue, respectively. We necessarily ensure the following two conditions;- if
pTrue >= 1.0d, thentrueis always returned. - if
pTrue <= 0.0d, thenfalseis always returned.
- パラメータ:
pTrue- the probability to returntrue- 戻り値:
- a random
booleanvalue - 導入されたバージョン:
- 30 hmkz
- if
-
nextChar
char nextChar()Returns acharvalue uniformly distributed on the range ofcharusing the next value of the random number sequence in this object.- 戻り値:
- a random
charvalue - 導入されたバージョン:
- 27 hmkz
-
nextChar
char nextChar(char n) Returns acharvalue 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
charvalue - 導入されたバージョン:
- 27 hmkz
-
nextChar
char nextChar(char min, char max) Returns acharvalue 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 returnedmax- the possible maximum value to be returned- 戻り値:
- a random
charvalue - 導入されたバージョン:
- 27 hmkz
-
nextByte
byte nextByte()Returns abytevalue uniformly distributed on the range ofbyteusing the next value of the random number sequence in this object.- 戻り値:
- a random
bytevalue - 導入されたバージョン:
- 27 hmkz
-
nextByte
byte nextByte(byte n) Returns abytevalue 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
bytevalue - 導入されたバージョン:
- 27 hmkz
-
nextByte
byte nextByte(byte min, byte max) Returns abytevalue 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 returnedmax- the possible maximum value to be returned- 戻り値:
- a random
bytevalue - 導入されたバージョン:
- 27 hmkz
-
nextShort
short nextShort()Returns ashortvalue uniformly distributed on the range ofshortusing the next value of the random number sequence in this object.- 戻り値:
- a random
shortvalue - 導入されたバージョン:
- 27 hmkz
-
nextShort
short nextShort(short n) Returns ashortvalue 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
shortvalue - 導入されたバージョン:
- 27 hmkz
-
nextShort
short nextShort(short min, short max) Returns ashortvalue 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 returnedmax- the possible maximum value to be returned- 戻り値:
- a random
shortvalue - 導入されたバージョン:
- 27 hmkz
-
nextInt
int nextInt()Returns anintvalue uniformly distributed on the range ofintusing the next value of the random number sequence in this object.- 戻り値:
- a random
intvalue - 導入されたバージョン:
- 2 hmkz
-
nextInt
int nextInt(int n) Returns anintvalue 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
intvalue - 導入されたバージョン:
- 2 hmkz
-
nextInt
int nextInt(int min, int max) Returns anintvalue 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 returnedmax- the possible maximum value to be returned- 戻り値:
- a random
intvalue - 導入されたバージョン:
- 2 hmkz
-
nextLong
long nextLong()Returns alongvalue uniformly distributed on the range oflongusing the next value of the random number sequence in this object.- 戻り値:
- a random
longvalue - 導入されたバージョン:
- 2 hmkz
-
nextLong
long nextLong(long n) Returns alongvalue 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
longvalue - 導入されたバージョン:
- 2 hmkz
-
nextLong
long nextLong(long min, long max) Returns alongvalue 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 returnedmax- the possible maximum value to be returned- 戻り値:
- a random
longvalue - 導入されたバージョン:
- 2 hmkz
-
nextFloat
float nextFloat()Returns afloatvalue 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
floatvalue - 導入されたバージョン:
- 2 hmkz
-
nextFloat
float nextFloat(float sup) Returns afloatvalue 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
floatvalue - 導入されたバージョン:
- 30 hmkz
-
nextFloat
float nextFloat(float min, float max) Returns afloatvalue 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 returnedmax- the possible maximum value to be returned- 戻り値:
- a random
floatvalue - 導入されたバージョン:
- 2 hmkz
-
nextDouble
double nextDouble()Returns adoublevalue 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
doublevalue - 導入されたバージョン:
- 2 hmkz
-
nextDouble
double nextDouble(double sup) Returns adoublevalue 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
doublevalue - 導入されたバージョン:
- 30 hmkz
-
nextDouble
double nextDouble(double min, double max) Returns adoublevalue 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 returnedmax- the possible maximum value to be returned- 戻り値:
- a random
doublevalue - 導入されたバージョン:
- 2 hmkz
-
nextGaussian
double nextGaussian()Returns adoublevalue on the standard Gaussian distribution (i.e. its mean is 0 and standard deviation is 1).- 戻り値:
- a random
doublevalue - 導入されたバージョン:
- 2 hmkz
-
nextGaussian
double nextGaussian(double mu, double sigma) Returns adoublevalue on the Gaussian distribution with the specified parameters;muandsigma.- パラメータ:
mu- the mean of Gaussian distributionsigma- the standard deviation of Gaussian distribution (must be non-negative)- 戻り値:
- a random
doublevalue - 導入されたバージョン:
- 2 hmkz
-
fill
void fill(boolean[] buf) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the range ofboolean.- パラメータ:
buf- a buffer to be filled with random numbers- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(boolean[] buf, double pTrue) Fills the specified arraybufwith random numbers. The random numbers are generated so that the probability to generatetrueandfalseis (approximately)pTrueand1 - pTrue, respectively. We necessarily ensure the following two conditions;- if
pTrue >= 1.0d, then all the elements of the resulting arraybufaretrue. - if
pTrue <= 0.0d, then all the elements of the resulting arraybufarefalse.
- パラメータ:
buf- a buffer to be filled with random numberspTrue- the probability to generatetrue- 導入されたバージョン:
- 30 hmkz
- if
-
fill
void fill(char[] buf) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the range ofchar.- パラメータ:
buf- a buffer to be filled with random numbers- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(char[] buf, char n) Fills the specified arraybufwith 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 numbersn- the number of possible values- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(char[] buf, char min, char max) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval[min, max].- パラメータ:
buf- a buffer to be filled with random numbersmin- the possible minimum value to be generatedmax- the possible maximum value to be generated- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(byte[] buf) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the range ofbyte.- パラメータ:
buf- a buffer to be filled with random numbers- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(byte[] buf, byte n) Fills the specified arraybufwith 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 numbersn- the number of possible values- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(byte[] buf, byte min, byte max) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval[min, max].- パラメータ:
buf- a buffer to be filled with random numbersmin- the possible minimum value to be generatedmax- the possible maximum value to be generated- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(short[] buf) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the range ofshort.- パラメータ:
buf- a buffer to be filled with random numbers- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(short[] buf, short n) Fills the specified arraybufwith 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 numbersn- the number of possible values- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(short[] buf, short min, short max) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval[min, max].- パラメータ:
buf- a buffer to be filled with random numbersmin- the possible minimum value to be generatedmax- the possible maximum value to be generated- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(int[] buf) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the range ofint.- パラメータ:
buf- a buffer to be filled with random numbers- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(int[] buf, int n) Fills the specified arraybufwith 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 numbersn- the number of possible values- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(int[] buf, int min, int max) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval[min, max].- パラメータ:
buf- a buffer to be filled with random numbersmin- the possible minimum value to be generatedmax- the possible maximum value to be generated- 導入されたバージョン:
- 2 hmkz
-
fill
void fill(long[] buf) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the range oflong.- パラメータ:
buf- a buffer to be filled with random numbers- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(long[] buf, long n) Fills the specified arraybufwith 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 numbersn- the number of possible values- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(long[] buf, long min, long max) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval[min, max].- パラメータ:
buf- a buffer to be filled with random numbersmin- the possible minimum value to be generatedmax- the possible maximum value to be generated- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(float[] buf) Fills the specified arraybufwith 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 arraybufwith 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 numberssup- the supremum of random numbers (exclusively)- 導入されたバージョン:
- 30 hmkz
-
fill
void fill(float[] buf, float min, float max) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval[min, max].- パラメータ:
buf- a buffer to be filled with random numbersmin- the possible minimum value to be generatedmax- the possible maximum value to be generated- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(double[] buf) Fills the specified arraybufwith 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 arraybufwith 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 numberssup- the supremum of random numbers (exclusively)- 導入されたバージョン:
- 30 hmkz
-
fill
void fill(double[] buf, double min, double max) Fills the specified arraybufwith random numbers. The random numbers are generated (approximately) uniform-randomly on the closed interval[min, max].- パラメータ:
buf- a buffer to be filled with random numbersmin- the possible minimum value to be generatedmax- the possible maximum value to be generated- 導入されたバージョン:
- 2 hmkz
-
shuffle
void shuffle(boolean[] a) Shuffles the specified arrayadestructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given arraya.- パラメータ:
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 firstnelements in the specified arrayadestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the firstnelements' 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 arrayn- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(boolean[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the elements' betweenbeginandendis (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 arraybegin- the index of the first element to be shuffledend- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(char[] a) Shuffles the specified arrayadestructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given arraya.- パラメータ:
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 firstnelements in the specified arrayadestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the firstnelements' 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 arrayn- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(char[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the elements' betweenbeginandendis (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 arraybegin- the index of the first element to be shuffledend- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(byte[] a) Shuffles the specified arrayadestructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given arraya.- パラメータ:
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 firstnelements in the specified arrayadestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the firstnelements' 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 arrayn- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(byte[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the elements' betweenbeginandendis (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 arraybegin- the index of the first element to be shuffledend- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(short[] a) Shuffles the specified arrayadestructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given arraya.- パラメータ:
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 firstnelements in the specified arrayadestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the firstnelements' 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 arrayn- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(short[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the elements' betweenbeginandendis (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 arraybegin- the index of the first element to be shuffledend- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(int[] a) Shuffles the specified arrayadestructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given arraya.- パラメータ:
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 firstnelements in the specified arrayadestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the firstnelements' 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 arrayn- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(int[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the elements' betweenbeginandendis (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 arraybegin- the index of the first element to be shuffledend- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(long[] a) Shuffles the specified arrayadestructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given arraya.- パラメータ:
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 firstnelements in the specified arrayadestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the firstnelements' 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 arrayn- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(long[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the elements' betweenbeginandendis (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 arraybegin- the index of the first element to be shuffledend- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(float[] a) Shuffles the specified arrayadestructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given arraya.- パラメータ:
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 firstnelements in the specified arrayadestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the firstnelements' 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 arrayn- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(float[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the elements' betweenbeginandendis (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 arraybegin- the index of the first element to be shuffledend- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(double[] a) Shuffles the specified arrayadestructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given arraya.- パラメータ:
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 firstnelements in the specified arrayadestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the firstnelements' 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 arrayn- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
void shuffle(double[] a, int begin, int end) Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the elements' betweenbeginandendis (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 arraybegin- the index of the first element to be shuffledend- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
Shuffles the specified arrayadestructively. The order of the elements in the resulting array are guaranteed to be (approximately) uniform-random for any given arraya.- パラメータ:
a- an array to be shuffled. The resulting array is returned by overwriting this array- 導入されたバージョン:
- 27 hmkz
-
shuffle
Shuffles the firstnelements in the specified arrayadestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the firstnelements' 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 arrayn- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
Shuffles the elements of the specified arrayaplaced betweenbeginandenddestructively. For any given arraya, the order of the elements in the resulting array are guaranteed that the elements' betweenbeginandendis (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 arraybegin- the index of the first element to be shuffledend- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
Shuffles the firstnelements in the specified list destructively. For any given listlist, the order of the elements in the resulting list are guaranteed that the firstnelements' 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 listn- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
Shuffles the elements of the specified list placed betweenbeginandenddestructively. For any given listlist, the order of the elements in the resulting list are guaranteed that the elements' betweenbeginandendis (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 listbegin- the index of the first element to be shuffledend- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
リストをシャッフルする.- 型パラメータ:
T- リスト内のオブジェクトのクラス- パラメータ:
list- リスト- 戻り値:
- シャッフル後のリスト
-
shuffleWithoutCopy
リストをシャッフルする. 元のリストに破壊的操作を行う.- 型パラメータ:
T- リスト内のオブジェクトのクラス- パラメータ:
list- リスト- 戻り値:
- シャッフル後のリスト
-
chooseWithReplacement
復元抽出.- 型パラメータ:
T- リスト内のオブジェクトのクラス- パラメータ:
list- リストn- 抽出数- 戻り値:
- 復元抽出リスト
-
chooseWithReplacement
復元抽出.- 型パラメータ:
T- セット内のオブジェクトのクラス- パラメータ:
set- セットn- 抽出数- 戻り値:
- 復元抽出リスト
-
chooseWithoutReplacement
非復元抽出.- 型パラメータ:
T- リスト内のオブジェクトのクラス- パラメータ:
list- リストn- 抽出数- 戻り値:
- 非復元抽出リスト
-
chooseWithoutReplacement
非復元抽出.- 型パラメータ:
T- セット内のオブジェクトのクラス- パラメータ:
set- セットn- 抽出数- 戻り値:
- 非復元抽出リスト
-
chooseWithoutReplacementWithoutCopy
非復元抽出. 元のリストに破壊的操作を行う.- 型パラメータ:
T- リスト内のオブジェクトのクラス- パラメータ:
list- リストn- 抽出数- 戻り値:
- 非復元抽出リスト
-