Class/Object

cogx.utilities

Random

Related Docs: object Random | package utilities

Permalink

class Random extends java.util.Random with Serializable

Single source of Random number generators from within the Cog core software. Outside the core, cog.Library.Random is generally used.

Usage:

new cogx.utilities.Random() returns generator per the global policy on determinism (see Random.Deterministic)

new cogx.utilities.Random(seed) returns seeded (i.e. deterministic) RNG

Ultimately, all of the underlying java.util.Random rng's have their seeds set. The seeds are taken from the seedGenerator, itself a random number generator. When the Deterministic flag is set, the seedGenerator is itself seeded, so all the other rng's have deterministic seeds. When the Deterministic flag is not set, the seedGenerator is not seeded and so returns a random sequence of seeds to the various rng's that get created.

Cog's Random here has extra hooks to help maintain randomly initialized fields. The idea is that such a field should look the same to multiple observers, and also reset back to the same initial state. A field's init function is guaranteed to be called starting with the first field point (with all-zero coordinates), plus Cog will ask for the field points contents in a deterministic manner.

User: Dick Carter Date: 12/12/12

Annotations
@SerialVersionUID()
Linear Supertypes
Serializable, java.util.Random, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Random
  2. Serializable
  3. Random
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Random()

    Permalink
  2. new Random(seed: Long)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def doubles(arg0: Double, arg1: Double): DoubleStream

    Permalink
    Definition Classes
    Random
  7. def doubles(arg0: Long, arg1: Double, arg2: Double): DoubleStream

    Permalink
    Definition Classes
    Random
  8. def doubles(): DoubleStream

    Permalink
    Definition Classes
    Random
  9. def doubles(arg0: Long): DoubleStream

    Permalink
    Definition Classes
    Random
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. def ints(arg0: Int, arg1: Int): IntStream

    Permalink
    Definition Classes
    Random
  16. def ints(arg0: Long, arg1: Int, arg2: Int): IntStream

    Permalink
    Definition Classes
    Random
  17. def ints(): IntStream

    Permalink
    Definition Classes
    Random
  18. def ints(arg0: Long): IntStream

    Permalink
    Definition Classes
    Random
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def longs(arg0: Long, arg1: Long): LongStream

    Permalink
    Definition Classes
    Random
  21. def longs(arg0: Long, arg1: Long, arg2: Long): LongStream

    Permalink
    Definition Classes
    Random
  22. def longs(): LongStream

    Permalink
    Definition Classes
    Random
  23. def longs(arg0: Long): LongStream

    Permalink
    Definition Classes
    Random
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. def next(arg0: Int): Int

    Permalink
    Attributes
    protected[java.util]
    Definition Classes
    Random
  26. def nextBoolean(): Boolean

    Permalink
    Definition Classes
    Random
  27. def nextBytes(arg0: Array[Byte]): Unit

    Permalink
    Definition Classes
    Random
  28. def nextDouble(): Double

    Permalink
    Definition Classes
    Random
  29. def nextFloat(): Float

    Permalink
    Definition Classes
    Random
  30. def nextFloatResetFirstIf(resetFirst: Boolean): Float

    Permalink

    return nextFloat, but not until after the rng is reset if resetFirst

  31. def nextGaussian(): Double

    Permalink
    Definition Classes
    Random
  32. def nextInt(arg0: Int): Int

    Permalink
    Definition Classes
    Random
  33. def nextInt(): Int

    Permalink
    Definition Classes
    Random
  34. def nextIntResetFirstIf(resetFirst: Boolean): Float

    Permalink

    return nextInt, but not until after the rng is reset if resetFirst

  35. def nextLong(): Long

    Permalink
    Definition Classes
    Random
  36. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. def reset(): Unit

    Permalink
  39. val seed: Long

    Permalink
  40. def setSeed(arg0: Long): Unit

    Permalink
    Definition Classes
    Random
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  42. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  43. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from java.util.Random

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped