trait GenMonad[Gen[_]] extends AnyRef

Monads that represent a random value generator

Source
GenMonad.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GenMonad
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def choose(min: Int, max: Int): Gen[Int]

    Creates a generator that produces values uniformly distributed across the range

    Creates a generator that produces values uniformly distributed across the range

    The generated values are inclusive of both min and max.

  2. abstract def const[A](c: A): Gen[A]

    Creates a generator that always returns the same value

  3. abstract def flatMap[A, B](a: Gen[A])(f: (A) ⇒ Gen[B]): Gen[B]

    Creates a new generator that applies the function to the output of the first generator and flattens the result

  4. abstract def generate[A](ga: Gen[A]): A

    Runs the given generator and returns the generated value

  5. abstract def map[A, B](a: Gen[A])(f: (A) ⇒ B): Gen[B]

    Creates a new generator that applies the function to the output of the first generator

  6. abstract def oneOf[A](items: A*): Gen[A]

    Creates a generator that uniformly selects from a list of items

  7. abstract def widen[A, B >: A](ga: Gen[A]): Gen[B]

    Returns the same generator but with a wider type parameter

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def flatten[A](gga: Gen[Gen[A]]): Gen[A]

    Flattens a nested generator into a single generator

  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped