TracingRandomKey

interface TracingRandomKey : RandomKey, Traceable

Types

RandomBase
Link copied to clipboard
interface RandomBase : TracingRandomKey
RandomTensorWrapper
Link copied to clipboard
class RandomTensorWrapper(key: RandomKey) : DTensor
Split
Link copied to clipboard
class Split(key: TracingRandomKey, n: Int) : TracingRandomKey.RandomBase
SplitPart
Link copied to clipboard
class SplitPart(split: TracingRandomKey, splitIndex: Int) : TracingRandomKey.RandomBase
SplitRandom
Link copied to clipboard
class SplitRandom(keys: List<RandomKey>) : RandomKey
Variable
Link copied to clipboard
class Variable(index: Int, traceId: TraceId, name: String?) : TracingRandomKey.RandomBase

Functions

accept
Link copied to clipboard
abstract fun <R> accept(v: TracingVisitor<R>): R
floats
Link copied to clipboard
open fun floats(n: Int): DTensor

Produce a fresh vector of the given length filled with random float values between 0 (inclusive) and 1 (exclusive). This method will always produce the same sequence of values for a given key.

abstract fun floats(shape: Shape): DTensor

Produce a fresh tensor of the given shape filled with uniformly distributed float values between 0 (inclusive) and 1 (exclusive). This method will always produce the same sequence of values for a given RandomKey instance.

gamma
Link copied to clipboard
abstract fun gamma(alpha: FloatTensor): DTensor

Produces a fresh tensor of samples from a gamma distribution, each with shape parameter from the corresponding value in the alpha parameter. This method will always produce the same sequence of values for a given RandomKey instance.

gaussian
Link copied to clipboard
abstract fun gaussian(shape: Shape): DTensor

Produce a fresh tensor of the given shape filled with normally distributed float values with a mean of 0 and standard deviation of 1. This method will always produce the same sequence of values for a given RandomKey instance.

permitReuse
Link copied to clipboard
abstract fun permitReuse(): RandomKey

Return a RandomKey just like this one, except that the newly returned instance permits repeated calls to split and floats.

split
Link copied to clipboard
abstract fun split(n: Int = 2): List<RandomKey>

Split this random key into a new set of distinct and statistically independent keys.

wrap
Link copied to clipboard
open override fun wrap(wrapper: Wrapper): RandomKey

Wrap random key

Properties

traceId
Link copied to clipboard
abstract val traceId: TraceId

Inheritors

RandomBase
Link copied to clipboard