cern.jet.random

## Class Benchmark

- java.lang.Object
- - cern.colt.PersistentObject
  - - cern.jet.random.Benchmark

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

      public class Benchmark
      extends PersistentObject

  Benchmarks random number generation from various distributions as well as PDF and CDF lookups.
  Version:
    1.0, 09/24/99
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class cern.colt.PersistentObject

      `serialVersionUID`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `demo1()` Prints the first `size` random numbers generated by the distribution.
    `static void` | `main(java.lang.String[] args)` Benchmarks all subclasses
    `static void` | `random(int size, boolean print, double mean, java.lang.String generatorName)` Benchmarks all subclasses
    `static void` | `randomInstance(int size, boolean print, AbstractDistribution dist)` generates random numbers from
    `static void` | `test(int size, AbstractDistribution distribution)` Prints the first `size` random numbers generated by the distribution.
    `static void` | `test2(int size, AbstractDistribution distribution)` Prints the first `size` random numbers generated by the distribution.
    `static void` | `test2(int size, AbstractDistribution a, AbstractDistribution b)` Prints the first `size` random numbers generated by the distribution.

    - ### Methods inherited from class cern.colt.PersistentObject

      `clone`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### demo1

          public static void demo1()

      Prints the first `size` random numbers generated by the distribution.

    - #### main

          public static void main(java.lang.String[] args)

      Benchmarks all subclasses
      Parameters:
        `args[0]` - the number of random numbers to be generated per subclass.
        `args[1]` - `true` prints each generated number, `false` does not print generated numbers (use this setting for benchmarking).

    - #### random

          public static void random(int size,
                    boolean print,
                    double mean,
                    java.lang.String generatorName)

      Benchmarks all subclasses
      Parameters:
        `size` - the number of random numbers to be generated per subclass.
        `print` - `true` prints each generated number, `false` does not print generated numbers (use this setting for benchmarking).
        `mean` - the mean for distributions that require a mean.

    - #### randomInstance

          public static void randomInstance(int size,
                            boolean print,
                            AbstractDistribution dist)

      generates random numbers from

    - #### test

          public static void test(int size,
                  AbstractDistribution distribution)

      Prints the first `size` random numbers generated by the distribution.

    - #### test2

          public static void test2(int size,
                   AbstractDistribution distribution)

      Prints the first `size` random numbers generated by the distribution.

    - #### test2

          public static void test2(int size,
                   AbstractDistribution a,
                   AbstractDistribution b)

      Prints the first `size` random numbers generated by the distribution.

Jump to the Colt Homepage