DiffktRandom

class DiffktRandom(randomKey: RandomKey) : Wrappable<DiffktRandom>

Types

Companion
Link copied to clipboard
object Companion

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getRandomKey
Link copied to clipboard
@JvmName(name = "getKey")
fun getRandomKey(): RandomKey
hashCode
Link copied to clipboard
open override fun hashCode(): Int
nextCauchy
Link copied to clipboard
fun nextCauchy(): DScalar

fun nextCauchy(shape: Shape): DTensor

Samples from a cauchy distribution with loc 0 and scale 1

fun nextCauchy(shape: Shape, loc: DTensor, scale: DTensor): DTensor

Samples from a cauchy distribution with loc and scale

nextChiSquare
Link copied to clipboard
fun nextChiSquare(shape: Shape, dof: DTensor): DTensor

Samples from a chi square distribution

nextGamma
Link copied to clipboard
fun nextGamma(shape: Shape, alpha: DTensor): DTensor

Samples from a gamma distribution with a shape parameter alpha (also known as k) and a scale/ rate parameter of 1

nextGammaWithRate
Link copied to clipboard
fun nextGammaWithRate(shape: Shape, alpha: DTensor, beta: DTensor): DTensor

Gamma distribution with a shape parameter alpha, which is equal to k, and a rate parameter β = 1/θ

nextGammaWithScale
Link copied to clipboard
fun nextGammaWithScale(shape: Shape, k: DTensor, theta: DTensor): DTensor

Gamma distribution with a shape parameter k, which is equal to alpha, and a scale parameter θ.

nextGaussian
Link copied to clipboard
fun nextGaussian(): DScalar

fun nextGaussian(shape: Shape): DTensor

Samples from a gaussian distribution with mean 0 and std 1 (standard deviation)

fun nextGaussian(shape: Shape, mean: DTensor, std: DTensor): DTensor

Samples from a gaussian distribution with mean and std (standard deviation)

nextUniform
Link copied to clipboard
fun nextUniform(): DScalar

fun nextUniform(shape: Shape): DTensor

Samples from a uniform distribution between 0 and 1

fun nextUniform(shape: Shape, low: DTensor, high: DTensor): DTensor

Samples from a uniform distribution between low and high

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

The wrap function should return the same static type it is declared on.

Properties

randomKey
Link copied to clipboard
val randomKey: RandomKey