trait GenMonad[Gen[_]] extends AnyRef
Monads that represent a random value generator
- Source
- GenMonad.scala
- Alphabetic
- By Inheritance
- GenMonad
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
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.
-
abstract
def
const[A](c: A): Gen[A]
Creates a generator that always returns the same value
-
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
-
abstract
def
generate[A](ga: Gen[A]): A
Runs the given generator and returns the generated value
-
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
-
abstract
def
oneOf[A](items: A*): Gen[A]
Creates a generator that uniformly selects from a list of items
-
abstract
def
widen[A, B >: A](ga: Gen[A]): Gen[B]
Returns the same generator but with a wider type parameter
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatten[A](gga: Gen[Gen[A]]): Gen[A]
Flattens a nested generator into a single generator
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
This is the documentation for Firrtl.