パッケージ 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) 復元抽出.void
fill
(boolean[] buf) Fills the specified arraybuf
with random numbers.void
fill
(boolean[] buf, double pTrue) Fills the specified arraybuf
with random numbers.void
fill
(byte[] buf) Fills the specified arraybuf
with random numbers.void
fill
(byte[] buf, byte n) Fills the specified arraybuf
with random numbers.void
fill
(byte[] buf, byte min, byte max) Fills the specified arraybuf
with random numbers.void
fill
(char[] buf) Fills the specified arraybuf
with random numbers.void
fill
(char[] buf, char n) Fills the specified arraybuf
with random numbers.void
fill
(char[] buf, char min, char max) Fills the specified arraybuf
with random numbers.void
fill
(double[] buf) Fills the specified arraybuf
with random numbers.void
fill
(double[] buf, double sup) Fills the specified arraybuf
with random numbers.void
fill
(double[] buf, double min, double max) Fills the specified arraybuf
with random numbers.void
fill
(float[] buf) Fills the specified arraybuf
with random numbers.void
fill
(float[] buf, float sup) Fills the specified arraybuf
with random numbers.void
fill
(float[] buf, float min, float max) Fills the specified arraybuf
with random numbers.void
fill
(int[] buf) Fills the specified arraybuf
with random numbers.void
fill
(int[] buf, int n) Fills the specified arraybuf
with random numbers.void
fill
(int[] buf, int min, int max) Fills the specified arraybuf
with random numbers.void
fill
(long[] buf) Fills the specified arraybuf
with random numbers.void
fill
(long[] buf, long n) Fills the specified arraybuf
with random numbers.void
fill
(long[] buf, long min, long max) Fills the specified arraybuf
with random numbers.void
fill
(short[] buf) Fills the specified arraybuf
with random numbers.void
fill
(short[] buf, short n) Fills the specified arraybuf
with random numbers.void
fill
(short[] buf, short min, short max) Fills the specified arraybuf
with random numbers.long
getSeed()
シード値を返す.boolean
Returns aboolean
value uniformly distributed on the range ofboolean
using the next value of the random number sequence in this object.boolean
nextBoolean
(double pTrue) Returns aboolean
value distributed on the range ofboolean
using the next value of the random number sequence in this object.byte
nextByte()
Returns abyte
value uniformly distributed on the range ofbyte
using the next value of the random number sequence in this object.byte
nextByte
(byte n) Returns abyte
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 abyte
value uniformly distributed on the closed interval[min, max]
using the next value of the random number sequence in this object.char
nextChar()
Returns achar
value uniformly distributed on the range ofchar
using the next value of the random number sequence in this object.char
nextChar
(char n) Returns achar
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 achar
value uniformly distributed on the closed interval[min, max]
using the next value of the random number sequence in this object.double
Returns adouble
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 adouble
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 adouble
value uniformly distributed on the closed interval[min, max]
using the next value of the random number sequence in this object.float
Returns afloat
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 afloat
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 afloat
value uniformly distributed on the closed interval[min, max]
using the next value of the random number sequence in this object.double
Returns adouble
value on the standard Gaussian distribution (i.e. its mean is 0 and standard deviation is 1).double
nextGaussian
(double mu, double sigma) Returns adouble
value on the Gaussian distribution with the specified parameters;mu
andsigma
.int
nextInt()
Returns anint
value uniformly distributed on the range ofint
using the next value of the random number sequence in this object.int
nextInt
(int n) Returns anint
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 anint
value uniformly distributed on the closed interval[min, max]
using the next value of the random number sequence in this object.long
nextLong()
Returns along
value uniformly distributed on the range oflong
using the next value of the random number sequence in this object.long
nextLong
(long n) Returns along
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 along
value uniformly distributed on the closed interval[min, max]
using the next value of the random number sequence in this object.short
Returns ashort
value uniformly distributed on the range ofshort
using the next value of the random number sequence in this object.short
nextShort
(short n) Returns ashort
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 ashort
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 arraya
destructively.void
shuffle
(boolean[] a, int n) Shuffles the firstn
elements in the specified arraya
destructively.void
shuffle
(boolean[] a, int begin, int end) Shuffles the elements of the specified arraya
placed betweenbegin
andend
destructively.void
shuffle
(byte[] a) Shuffles the specified arraya
destructively.void
shuffle
(byte[] a, int n) Shuffles the firstn
elements in the specified arraya
destructively.void
shuffle
(byte[] a, int begin, int end) Shuffles the elements of the specified arraya
placed betweenbegin
andend
destructively.void
shuffle
(char[] a) Shuffles the specified arraya
destructively.void
shuffle
(char[] a, int n) Shuffles the firstn
elements in the specified arraya
destructively.void
shuffle
(char[] a, int begin, int end) Shuffles the elements of the specified arraya
placed betweenbegin
andend
destructively.void
shuffle
(double[] a) Shuffles the specified arraya
destructively.void
shuffle
(double[] a, int n) Shuffles the firstn
elements in the specified arraya
destructively.void
shuffle
(double[] a, int begin, int end) Shuffles the elements of the specified arraya
placed betweenbegin
andend
destructively.void
shuffle
(float[] a) Shuffles the specified arraya
destructively.void
shuffle
(float[] a, int n) Shuffles the firstn
elements in the specified arraya
destructively.void
shuffle
(float[] a, int begin, int end) Shuffles the elements of the specified arraya
placed betweenbegin
andend
destructively.void
shuffle
(int[] a) Shuffles the specified arraya
destructively.void
shuffle
(int[] a, int n) Shuffles the firstn
elements in the specified arraya
destructively.void
shuffle
(int[] a, int begin, int end) Shuffles the elements of the specified arraya
placed betweenbegin
andend
destructively.void
shuffle
(long[] a) Shuffles the specified arraya
destructively.void
shuffle
(long[] a, int n) Shuffles the firstn
elements in the specified arraya
destructively.void
shuffle
(long[] a, int begin, int end) Shuffles the elements of the specified arraya
placed betweenbegin
andend
destructively.void
shuffle
(short[] a) Shuffles the specified arraya
destructively.void
shuffle
(short[] a, int n) Shuffles the firstn
elements in the specified arraya
destructively.void
shuffle
(short[] a, int begin, int end) Shuffles the elements of the specified arraya
placed betweenbegin
andend
destructively.void
Shuffles the specified arraya
destructively.void
Shuffles the firstn
elements in the specified arraya
destructively.void
Shuffles the elements of the specified arraya
placed betweenbegin
andend
destructively.void
Shuffles the firstn
elements in the specified list destructively.void
Shuffles the elements of the specified list placed betweenbegin
andend
destructively.<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 aboolean
value uniformly distributed on the range ofboolean
using the next value of the random number sequence in this object.- 戻り値:
- a random
boolean
value - 導入されたバージョン:
- 2 hmkz
-
nextBoolean
boolean nextBoolean(double pTrue) Returns aboolean
value distributed on the range ofboolean
using the next value of the random number sequence in this object. The probability to returntrue
andfalse
is (approximately)pTrue
and1 - pTrue
, respectively. We necessarily ensure the following two conditions;- if
pTrue >= 1.0d
, thentrue
is always returned. - if
pTrue <= 0.0d
, thenfalse
is always returned.
- パラメータ:
pTrue
- the probability to returntrue
- 戻り値:
- a random
boolean
value - 導入されたバージョン:
- 30 hmkz
- if
-
nextChar
char nextChar()Returns achar
value uniformly distributed on the range ofchar
using the next value of the random number sequence in this object.- 戻り値:
- a random
char
value - 導入されたバージョン:
- 27 hmkz
-
nextChar
char nextChar(char n) Returns achar
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 achar
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 returnedmax
- the possible maximum value to be returned- 戻り値:
- a random
char
value - 導入されたバージョン:
- 27 hmkz
-
nextByte
byte nextByte()Returns abyte
value uniformly distributed on the range ofbyte
using the next value of the random number sequence in this object.- 戻り値:
- a random
byte
value - 導入されたバージョン:
- 27 hmkz
-
nextByte
byte nextByte(byte n) Returns abyte
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 abyte
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 returnedmax
- the possible maximum value to be returned- 戻り値:
- a random
byte
value - 導入されたバージョン:
- 27 hmkz
-
nextShort
short nextShort()Returns ashort
value uniformly distributed on the range ofshort
using the next value of the random number sequence in this object.- 戻り値:
- a random
short
value - 導入されたバージョン:
- 27 hmkz
-
nextShort
short nextShort(short n) Returns ashort
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 ashort
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 returnedmax
- the possible maximum value to be returned- 戻り値:
- a random
short
value - 導入されたバージョン:
- 27 hmkz
-
nextInt
int nextInt()Returns anint
value uniformly distributed on the range ofint
using the next value of the random number sequence in this object.- 戻り値:
- a random
int
value - 導入されたバージョン:
- 2 hmkz
-
nextInt
int nextInt(int n) Returns anint
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 anint
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 returnedmax
- the possible maximum value to be returned- 戻り値:
- a random
int
value - 導入されたバージョン:
- 2 hmkz
-
nextLong
long nextLong()Returns along
value uniformly distributed on the range oflong
using the next value of the random number sequence in this object.- 戻り値:
- a random
long
value - 導入されたバージョン:
- 2 hmkz
-
nextLong
long nextLong(long n) Returns along
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 along
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 returnedmax
- the possible maximum value to be returned- 戻り値:
- a random
long
value - 導入されたバージョン:
- 2 hmkz
-
nextFloat
float nextFloat()Returns afloat
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 afloat
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 afloat
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 returnedmax
- the possible maximum value to be returned- 戻り値:
- a random
float
value - 導入されたバージョン:
- 2 hmkz
-
nextDouble
double nextDouble()Returns adouble
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 adouble
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 adouble
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 returnedmax
- the possible maximum value to be returned- 戻り値:
- a random
double
value - 導入されたバージョン:
- 2 hmkz
-
nextGaussian
double nextGaussian()Returns adouble
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 adouble
value on the Gaussian distribution with the specified parameters;mu
andsigma
.- パラメータ:
mu
- the mean of Gaussian distributionsigma
- the standard deviation of Gaussian distribution (must be non-negative)- 戻り値:
- a random
double
value - 導入されたバージョン:
- 2 hmkz
-
fill
void fill(boolean[] buf) Fills the specified arraybuf
with 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 arraybuf
with random numbers. The random numbers are generated so that the probability to generatetrue
andfalse
is (approximately)pTrue
and1 - pTrue
, respectively. We necessarily ensure the following two conditions;- if
pTrue >= 1.0d
, then all the elements of the resulting arraybuf
aretrue
. - if
pTrue <= 0.0d
, then all the elements of the resulting arraybuf
arefalse
.
- パラメータ:
buf
- a buffer to be filled with random numberspTrue
- the probability to generatetrue
- 導入されたバージョン:
- 30 hmkz
- if
-
fill
void fill(char[] buf) Fills the specified arraybuf
with 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 arraybuf
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 numbersn
- the number of possible values- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(char[] buf, char min, char max) Fills the specified arraybuf
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 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 arraybuf
with 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 arraybuf
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 numbersn
- the number of possible values- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(byte[] buf, byte min, byte max) Fills the specified arraybuf
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 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 arraybuf
with 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 arraybuf
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 numbersn
- the number of possible values- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(short[] buf, short min, short max) Fills the specified arraybuf
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 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 arraybuf
with 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 arraybuf
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 numbersn
- the number of possible values- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(int[] buf, int min, int max) Fills the specified arraybuf
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 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 arraybuf
with 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 arraybuf
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 numbersn
- the number of possible values- 導入されたバージョン:
- 27 hmkz
-
fill
void fill(long[] buf, long min, long max) Fills the specified arraybuf
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 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 arraybuf
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 arraybuf
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 numberssup
- the supremum of random numbers (exclusively)- 導入されたバージョン:
- 30 hmkz
-
fill
void fill(float[] buf, float min, float max) Fills the specified arraybuf
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 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 arraybuf
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 arraybuf
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 numberssup
- the supremum of random numbers (exclusively)- 導入されたバージョン:
- 30 hmkz
-
fill
void fill(double[] buf, double min, double max) Fills the specified arraybuf
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 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 arraya
destructively. 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 firstn
elements in the specified arraya
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the firstn
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 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 arraya
placed betweenbegin
andend
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the elements' betweenbegin
andend
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 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 arraya
destructively. 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 firstn
elements in the specified arraya
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the firstn
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 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 arraya
placed betweenbegin
andend
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the elements' betweenbegin
andend
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 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 arraya
destructively. 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 firstn
elements in the specified arraya
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the firstn
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 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 arraya
placed betweenbegin
andend
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the elements' betweenbegin
andend
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 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 arraya
destructively. 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 firstn
elements in the specified arraya
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the firstn
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 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 arraya
placed betweenbegin
andend
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the elements' betweenbegin
andend
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 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 arraya
destructively. 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 firstn
elements in the specified arraya
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the firstn
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 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 arraya
placed betweenbegin
andend
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the elements' betweenbegin
andend
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 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 arraya
destructively. 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 firstn
elements in the specified arraya
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the firstn
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 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 arraya
placed betweenbegin
andend
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the elements' betweenbegin
andend
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 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 arraya
destructively. 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 firstn
elements in the specified arraya
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the firstn
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 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 arraya
placed betweenbegin
andend
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the elements' betweenbegin
andend
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 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 arraya
destructively. 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 firstn
elements in the specified arraya
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the firstn
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 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 arraya
placed betweenbegin
andend
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the elements' betweenbegin
andend
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 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 arraya
destructively. 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 firstn
elements in the specified arraya
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the firstn
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 arrayn
- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
Shuffles the elements of the specified arraya
placed betweenbegin
andend
destructively. For any given arraya
, the order of the elements in the resulting array are guaranteed that the elements' betweenbegin
andend
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 arraybegin
- the index of the first element to be shuffledend
- the index of the last element to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
Shuffles the firstn
elements in the specified list destructively. For any given listlist
, the order of the elements in the resulting list are guaranteed that the firstn
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 listn
- the number of elements to be shuffled- 導入されたバージョン:
- 27 hmkz
-
shuffle
Shuffles the elements of the specified list placed betweenbegin
andend
destructively. For any given listlist
, the order of the elements in the resulting list are guaranteed that the elements' betweenbegin
andend
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 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
- 抽出数- 戻り値:
- 非復元抽出リスト
-