Random

object Random
Companion:
class
class Object
trait Matchable
class Any
Random.type

Value members

Concrete methods

def apply[F[_]](implicit ev: Random[F]): Random[F]
def javaSecuritySecureRandom[F[_] : Sync](n: Int): F[Random[F]]
def javaUtilRandom[F[_] : Sync](random: Random): F[Random[F]]

Lift Java Random to this algebra. Note: this implies the ability for external locations to manipulate the underlying state without referential transparency.

Lift Java Random to this algebra. Note: this implies the ability for external locations to manipulate the underlying state without referential transparency.

def scalaUtilRandom[F[_] : Sync]: F[Random[F]]

Creates a new random number generator

Creates a new random number generator

def scalaUtilRandomN[F[_] : Sync](n: Int): F[Random[F]]

Creates Several Random Number Generators and equally allocates the load across those instances.

Creates Several Random Number Generators and equally allocates the load across those instances.

From the java class docs: https://docs.oracle.com/javase/8/docs/api/java/util/Random.html#java.util.Random

Instances of java.util.Random are threadsafe. However, the concurrent use of the same java.util.Random instance across threads may encounter contention and consequent poor performance. Consider instead using ThreadLocalRandom in multithreaded designs.

def scalaUtilRandomSeedInt[F[_] : Sync](seed: Int): F[Random[F]]

Creates a new random number generator using a single integer seed.

Creates a new random number generator using a single integer seed.

def scalaUtilRandomSeedLong[F[_] : Sync](seed: Long): F[Random[F]]

Creates a new random number generator using a single long seed.

Creates a new random number generator using a single long seed.

Implicits

Implicits

implicit def catsEitherTRandom[F[_] : Functor, L]: Random[[_] =>> EitherT[F, L, _$6]]

Random instance built for cats.data.EitherT values initialized with any F data type that also implements Random.

Random instance built for cats.data.EitherT values initialized with any F data type that also implements Random.

implicit def catsIndexedReaderWriterStateTRandom[F[_] : Applicative, E, L : Monoid, S]: Random[[_] =>> IndexedReaderWriterStateT[F, E, L, S, S, _$18]]

Random instance built for cats.data.IndexedReaderWriterStateT values initialized with any F data type that also implements Random.

Random instance built for cats.data.IndexedReaderWriterStateT values initialized with any F data type that also implements Random.

implicit def catsIndexedStateTRandom[F[_] : Applicative, S]: Random[[_] =>> IndexedStateT[F, S, S, _$12]]

Random instance built for cats.data.IndexedStateT values initialized with any F data type that also implements Random.

Random instance built for cats.data.IndexedStateT values initialized with any F data type that also implements Random.

implicit def catsIorTRandom[F[_] : Functor, L]: Random[[_] =>> IorT[F, L, _$16]]

Random instance built for cats.data.IorT values initialized with any F data type that also implements Random.

Random instance built for cats.data.IorT values initialized with any F data type that also implements Random.

implicit def catsKleisliRandom[F[_] : Random, R]: Random[[_] =>> Kleisli[F, R, _$8]]

Random instance built for cats.data.Kleisli values initialized with any F data type that also implements Random.

Random instance built for cats.data.Kleisli values initialized with any F data type that also implements Random.

implicit def catsOptionTRandom[F[_] : Functor]: Random[[_] =>> OptionT[F, _$10]]

Random instance built for cats.data.OptionT values initialized with any F data type that also implements Random.

Random instance built for cats.data.OptionT values initialized with any F data type that also implements Random.

implicit def catsWriterTRandom[F[_] : Applicative, L : Monoid]: Random[[_] =>> WriterT[F, L, _$14]]

Random instance built for cats.data.WriterT values initialized with any F data type that also implements Random.

Random instance built for cats.data.WriterT values initialized with any F data type that also implements Random.