Dist

final case class Dist[P, A](support: Map[A, P])
Note:

The implementation relies on universal equals and hashCode of A for performance. Results will be incorrect otherwise.

Companion:
object
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def expect(f: A => P)(using P: Rig[P]): P
def flatMap[B](f: A => Dist[P, B])(using P: Rig[P], eq: Eq[P]): Dist[P, B]
def map[B](f: A => B)(using P: AdditiveMonoid[P]): Dist[P, B]
def mean(using ev: A <:< P, P: Rig[P]): P

Inherited methods

Inherited from:
Product