Random

cats.effect.std.Random$
See theRandom companion trait
object Random

Attributes

Companion:
trait
Source:
Random.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Random.type

Members list

Concise view

Value members

Concrete methods

def apply[F[_]](implicit ev: Random[F]): Random[F]

Attributes

Source:
Random.scala
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.

Attributes

Source:
Random.scala
def scalaUtilRandom[F[_] : Sync]: F[Random[F]]

Creates a new random number generator

Creates a new random number generator

Attributes

Source:
Random.scala
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.

Attributes

Source:
Random.scala
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.

Attributes

Source:
Random.scala
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.

Attributes

Source:
Random.scala

Deprecated methods

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

Attributes

Deprecated
true
Source:
Random.scala

Attributes

Deprecated
true
Source:
Random.scala

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.

Attributes

Source:
Random.scala
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.

Attributes

Source:
Random.scala
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.

Attributes

Source:
Random.scala
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.

Attributes

Source:
Random.scala
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.

Attributes

Source:
Random.scala
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.

Attributes

Source:
Random.scala
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.

Attributes

Source:
Random.scala