All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class Supporting.Random
java.lang.Object
   |
   +----Supporting.Random
  -  public class Random
  -  extends Object
Random number class, using a 31-bit
 linear congruential generator.
 Note that java.util contains a class Random,
 so watch out for name conflicts.
   
  -   Random() Random()
-   Construct this Random object with
 initial state obtained from system clock.
  
-   Random(int) Random(int)
-   Construct this Random object with
 specified initial state.
   
  -   negExp(double) negExp(double)
-   Return an int using a negative exponential
 distribution, and change the internal state.
  
-   permute(Object[]) permute(Object[])
-   Randomly rearrange an array.
  
-   poisson(double) poisson(double)
-   Return an int using a Poisson distribution, and
 change the internal state.
  
-   randomInt() randomInt()
-   Return a pseudorandom int, and change the
 internal state.
  
-   randomInt(int, int) randomInt(int, int)
-   Return an int in the closed range [low,high], and
 change the internal state.
  
-   randomReal() randomReal()
-   Return a double in the open range (0,1), and
 change the internal state.
   
 Random
Random
  public Random()
  -  Construct this Random object with
 initial state obtained from system clock.
 
 Random
Random
  public Random(int initialValue)
  -  Construct this Random object with
 specified initial state.
   
    -  Parameters:
    
-  initialValue - the initial state.
  
 
   
 randomInt
randomInt
  public int randomInt()
  -  Return a pseudorandom int, and change the
 internal state.
   
    -  Returns:
    
-  the pseudorandom int.
  
 
 randomReal
randomReal
  public double randomReal()
  -  Return a double in the open range (0,1), and
 change the internal state.
   
    -  Returns:
    
-  the pseudorandom double.
  
 
 randomInt
randomInt
  public int randomInt(int low,
                       int high)
  -  Return an int in the closed range [low,high], and
 change the internal state.
   
    -  Parameters:
    
-  low - the minimum value returned.
    -  high - the maximum value returned.
    
-  Returns:
    
-  the pseudorandom int.
  
 
 poisson
poisson
  public int poisson(double expectedValue)
  -  Return an int using a Poisson distribution, and
 change the internal state.
   
    -  Parameters:
    
-  expectedValue - the mean of the distribution.
    
-  Returns:
    
-  the pseudorandom int.
  
 
 negExp
negExp
  public double negExp(double expectedValue)
  -  Return an int using a negative exponential
 distribution, and change the internal state.
   
    -  Parameters:
    
-  expectedValue - the mean of the distribution.
    
-  Returns:
    
-  the pseudorandom int.
  
 
 permute
permute
  public final static void permute(Object a[])
  -  Randomly rearrange an array.
 The random numbers used depend on the time and day.
   
    -  Parameters:
    
-  a - the array.
  
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index