Skip to contents

Draw-for-draw match to Python morie.fn.hmdfw.lcg_normal: odd-length shapes draw one extra pair and discard the last value.

Usage

morie_lcg_normal(shape, seed)

Arguments

shape

Integer vector of output dimensions.

seed

LCG seed.

Value

Array of shape with row-major (Python) fill order.

Examples

morie_lcg_normal(shape = c(2, 3), seed = 7)
#>            [,1]       [,2]       [,3]
#> [1,]  1.4485494 -0.8752844  0.8877775
#> [2,] -0.4385101  1.5130837 -1.9309506