Class Random


  • public class Random
    extends java.lang.Object
    Generation of random numbers.
    • Constructor Summary

      Constructors 
      Constructor Description
      Random​(long cPtr, boolean cMemoryOwn)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()  
      static long getCPtr​(Random obj)  
      static double ran()
      A random double in the range [0, 1[ using a uniform distribution.

      Note: Uses boost::random
      static double ran​(double from, double to)
      A random double in the range [from, to[ using a uniform distribution.

      Note: Uses boost::random
      static int ranI​(int from, int to)
      A random integer in the range [from, to[ using a uniform distribution.

      Note: Uses boost::random
      static double ranNormalDist​(double mean, double sigma)
      Returns a random sample around mean with standard deviation sigma using the
      normal distribution.

      Note: Uses boost::random

      static void seed()
      Seeds the random number generator with current time of day

      Note: Uses boost::random
      static void seed​(long seed)
      Seeds the random number generator.

      Note: Uses boost::random
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Random

        public Random​(long cPtr,
                      boolean cMemoryOwn)
    • Method Detail

      • getCPtr

        public static long getCPtr​(Random obj)
      • delete

        public void delete()
      • ran

        public static double ran()
        A random double in the range [0, 1[ using a uniform distribution.

        Note: Uses boost::random
      • seed

        public static void seed​(long seed)
        Seeds the random number generator.

        Note: Uses boost::random
      • seed

        public static void seed()
        Seeds the random number generator with current time of day

        Note: Uses boost::random
      • ran

        public static double ran​(double from,
                                 double to)
        A random double in the range [from, to[ using a uniform distribution.

        Note: Uses boost::random
      • ranI

        public static int ranI​(int from,
                               int to)
        A random integer in the range [from, to[ using a uniform distribution.

        Note: Uses boost::random
      • ranNormalDist

        public static double ranNormalDist​(double mean,
                                           double sigma)
        Returns a random sample around mean with standard deviation sigma using the
        normal distribution.

        Note: Uses boost::random

        Parameters:
        mean - [in] Means value
        sigma - [in] Standard deviation
        Returns:
        Random sample