org.kde.koala
public class KRandomSequence extends Object implements QtSupport
UNKNOWN: A class to create a pseudo-random sequence
Constructor Summary | |
---|---|
protected | KRandomSequence(Class dummy) |
KRandomSequence(long lngSeed)
Creates a pseudo-random sequence based on the seed lngSeed.
| |
KRandomSequence() | |
KRandomSequence(KRandomSequence a)
Copy constructor |
Method Summary | |
---|---|
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
protected void | finalize() Deletes the wrapped C++ instance |
boolean | getBool()
Get a booleanean from the pseudo-random sequence. |
double | getDouble()
Get the next number from the pseudo-random sequence. |
long | getLong(long max)
Get the next number from the pseudo-random sequence. |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
void | modulate(int i)
Modulate the random sequence.
|
void | setSeed(long lngSeed)
Restart the sequence based on lngSeed. |
void | setSeed() |
Parameters: lngSeed Seed to initialize the sequence with. If lngSeed is 0, the sequence is initialized with a value from KApplication.random().
UNKNOWN: Creates a pseudo-random sequence based on the seed lngSeed.
UNKNOWN: Copy constructor
Returns: a boolean which is either true or false
UNKNOWN: Get a boolean from the pseudo-random sequence.
Returns: a pseudo-random double value between [0,1[
UNKNOWN: Get the next number from the pseudo-random sequence.
Returns: a pseudo-random integer value between [0, max[ with 0 <= max < 1.000.000
UNKNOWN: Get the next number from the pseudo-random sequence.
Parameters: i the sequence identified
UNKNOWN: Modulate the random sequence.
Parameters: lngSeed Seed to initialize the sequence with. If lngSeed is 0, the sequence is initialized with a value from KApplication.random().
UNKNOWN: Restart the sequence based on lngSeed.