RNG_Java

com.phasmidsoftware.lascala.RNG_Java
See theRNG_Java companion object
abstract class RNG_Java[+A](n: Long, f: Long => A) extends RNG[A]

An abstract base class which implements some of the basic functionality of RNG

Type parameters

A

the underlying type of this Random Number Generator

Value parameters

n

the Long value which defines this state of the RNG

Attributes

Companion
object
Graph
Supertypes
trait RNG[A]
trait () => A
class Object
trait Matchable
class Any
Known subtypes
class DoubleRNG
class GaussianRNG
class LongRNG
Self type

Members list

Value members

Abstract methods

def buildNew(n: Long): RNG_Java[A]

Method to build a new instance of this RNG

Method to build a new instance of this RNG

Value parameters

n

the state

Attributes

Returns

a new instance of RNG as a RNG_Java

Concrete methods

def apply(): A

The apply method: takes no parameter and yields an A

The apply method: takes no parameter and yields an A

Attributes

Returns

A

def map[B](f: A => B): RNG[B]

Method to map this RNG into another RNG

Method to map this RNG into another RNG

Type parameters

B

the underlying type of the new RNG

Value parameters

f

the map function which should be applied to the underlying value.

Attributes

Returns

a new RNG[B]

def next: RNG_Java[A]

Method to yield the next RNG in the pseudo-random sequence. Extenders don't normally need to override this.

Method to yield the next RNG in the pseudo-random sequence. Extenders don't normally need to override this.

Attributes

def nextSeed: Long

Method to yield the next seed value. This implementation simply calls the nextSeed method in the companion object.

Method to yield the next seed value. This implementation simply calls the nextSeed method in the companion object.

may be overridden (if you want to define your own pseudo-random sequence)

Attributes

Returns

a Long value

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function0 -> Any