Dist

trait Dist[@specialized A]
Companion
object
class Any
class DistFromGen[A]
Dist[A]

Value members

Abstract methods

def apply(gen: Generator): A
Implicitly added by rational
def apply(gen: Generator): A

Concrete methods

final
def count(pred: A => Boolean, n: Int)(implicit gen: Generator): Int
Implicitly added by rational
final
def count(pred: A => Boolean, n: Int)(implicit gen: Generator): Int
def ev(n: Int)(implicit gen: Generator, alg: Field[A]): A
Implicitly added by rational
def ev(n: Int)(implicit gen: Generator, alg: Field[A]): A
def fill(gen: Generator, arr: Array[A]): Unit
Implicitly added by rational
def fill(gen: Generator, arr: Array[A]): Unit
final
def filter(pred: A => Boolean): Dist[A]
Implicitly added by rational
final
def filter(pred: A => Boolean): Dist[A]
final
def flatMap[B](f: A => Dist[B]): Dist[B]
Implicitly added by rational
final
def flatMap[B](f: A => Dist[B]): Dist[B]
def foldn[B](init: B, n: Int)(f: (B, A) => B): Dist[B]
Implicitly added by rational
def foldn[B](init: B, n: Int)(f: (B, A) => B): Dist[B]
final
def given(pred: A => Boolean): Dist[A]
Implicitly added by rational
final
def given(pred: A => Boolean): Dist[A]
def histogram(n: Int)(implicit gen: Generator): Map[A, Double]
Implicitly added by rational
def histogram(n: Int)(implicit gen: Generator): Map[A, Double]
def iterate(n: Int, f: A => Dist[A]): Dist[A]
Implicitly added by rational
def iterate(n: Int, f: A => Dist[A]): Dist[A]
def iterateUntil(pred: A => Boolean, f: A => Dist[A]): Dist[A]
Implicitly added by rational
def iterateUntil(pred: A => Boolean, f: A => Dist[A]): Dist[A]
final
def map[B](f: A => B): Dist[B]
Implicitly added by rational
final
def map[B](f: A => B): Dist[B]
def pack(n: Int)(implicit ct: ClassTag[A]): Dist[Array[A]]
Implicitly added by rational
def pack(n: Int)(implicit ct: ClassTag[A]): Dist[Array[A]]
def pr(pred: A => Boolean, n: Int)(implicit gen: Generator): Double
Implicitly added by rational
def pr(pred: A => Boolean, n: Int)(implicit gen: Generator): Double
def rawHistogram(n: Int)(implicit gen: Generator): Map[A, Int]
Implicitly added by rational
def rawHistogram(n: Int)(implicit gen: Generator): Map[A, Int]
def repeat[CC <: (Seq)](n: Int)(implicit cbf: Factory[A, CC[A]]): Dist[CC[A]]
Implicitly added by rational
def repeat[CC <: (Seq)](n: Int)(implicit cbf: Factory[A, CC[A]]): Dist[CC[A]]
def sample[CC <: (Iterable)](n: Int)(implicit gen: Generator, cbf: Factory[A, CC[A]]): CC[A]
Implicitly added by rational
def sample[CC <: (Iterable)](n: Int)(implicit gen: Generator, cbf: Factory[A, CC[A]]): CC[A]
def sum(n: Int)(implicit gen: Generator, alg: Rig[A]): A
Implicitly added by rational
def sum(n: Int)(implicit gen: Generator, alg: Rig[A]): A
final
def toIterator(gen: Generator): Iterator[A]
Implicitly added by rational
final
def toIterator(gen: Generator): Iterator[A]
final
def toLazyList(gen: Generator): LazyList[A]
Implicitly added by rational
final
def toLazyList(gen: Generator): LazyList[A]
def unfold[B](init: B)(f: (B, A) => B)(pred: B => Boolean): Dist[B]
Implicitly added by rational
def unfold[B](init: B)(f: (B, A) => B)(pred: B => Boolean): Dist[B]
def until(pred: A => Boolean): Dist[Seq[A]]
Implicitly added by rational
def until(pred: A => Boolean): Dist[Seq[A]]
final
def zip[B](that: Dist[B]): Dist[(A, B)]
Implicitly added by rational
final
def zip[B](that: Dist[B]): Dist[(A, B)]
def zipWith[B, C](that: Dist[B])(f: (A, B) => C): Dist[C]
Implicitly added by rational
def zipWith[B, C](that: Dist[B])(f: (A, B) => C): Dist[C]

Deprecated methods

@deprecated("prefer toLazyList instead", "0.17.0")
final
def toStream(gen: Generator): Stream[A]
Implicitly added by rational
Deprecated
@deprecated("prefer toLazyList instead", "0.17.0")
final
def toStream(gen: Generator): Stream[A]
Deprecated