Generate values from a uniform distribution.

Generate values from a uniform distribution.

See also

Methods

Public methods


Method new()

Create a new UniformGenerator object.

Usage

UniformGenerator$new(sc)

Arguments

sc

A spark_connection.

Returns

A new UniformGenerator object.

Examples

\dontrun{
  sc <- sparklyr::spark_connect(master = "local")
  unif_gen <- UniformGenerator$new(sc = sc)
}


Method next_value()

Get the next value

Usage

UniformGenerator$next_value()

Returns

A numeric(1) i.i.d.

Examples

\dontrun{
  unif_gen$next_value()
}


Method set_seed()

Set random seed

Usage

UniformGenerator$set_seed(seed)

Arguments

seed

integer(1). The unit.

Returns

NULL, invisibly.

Examples

\dontrun{
  unif_gen$set_seed(1L)
}


Method clone()

The objects of this class are cloneable with this method.

Usage

UniformGenerator$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

## ------------------------------------------------ ## 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) }