Generate values from a uniform distribution.
Generate values from a uniform distribution.
new()
Create a new UniformGenerator
object.
UniformGenerator$new(sc)
sc
A spark_connection
.
A new UniformGenerator
object.
\dontrun{ sc <- sparklyr::spark_connect(master = "local") unif_gen <- UniformGenerator$new(sc = sc) }
next_value()
Get the next value
UniformGenerator$next_value()
A numeric(1)
i.i.d.
\dontrun{ unif_gen$next_value() }
set_seed()
Set random seed
UniformGenerator$set_seed(seed)
seed
integer(1)
. The unit.
NULL
, invisibly.
\dontrun{ unif_gen$set_seed(1L) }
clone()
The objects of this class are cloneable with this method.
UniformGenerator$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------ ## Method `UniformGenerator$new` ## ------------------------------------------------ if (FALSE) { sc <- sparklyr::spark_connect(master = "local") unif_gen <- UniformGenerator$new(sc = sc) } ## ------------------------------------------------ ## Method `UniformGenerator$next_value` ## ------------------------------------------------ if (FALSE) { unif_gen$next_value() } ## ------------------------------------------------ ## Method `UniformGenerator$set_seed` ## ------------------------------------------------ if (FALSE) { unif_gen$set_seed(1L) }