Skip to content

Distribution

class Distribution<Value> < Object

Probability distribution.

  • Value: Value type.

Member Variables

Name Description
delay:DelayValue<Value>? Associated node on delayed sampling -path.
x:Random<Value>& Associated random variate.

Member Functions

Name Description
associate Associate a random variate with this distribution.
realize Instantiate the associated delayed random variate.
simulate Simulate a random variate.
observe Observe a random variate.
pmf Evaluate the probability mass function (if it exists) at a value.
pdf Evaluate the probability density function (if it exists) at a value.
cdf Evaluate the cumulative distribution function at a value.
lower Finite lower bound of the support of this node, if any.
upper Finite upper bound of the support of this node, if any.
graft Graft this onto the delayed sampling -path.

Member Function Details

associate

function associate(x:Random<Value>)

Associate a random variate with this distribution.

cdf

function cdf(x:Value) -> Real

Evaluate the cumulative distribution function at a value.

  • x: The value.

Return: the cumulative probability

graft

function graft()

Graft this onto the delayed sampling -path.

lower

function lower() -> Value?

Finite lower bound of the support of this node, if any.

observe

function observe(x:Value) -> Real

Observe a random variate.

  • x: The value.

Return: The log likelihood.

pdf

function pdf(x:Value) -> Real

Evaluate the probability density function (if it exists) at a value.

  • x: The value.

Return: the probability density.

pmf

function pmf(x:Value) -> Real

Evaluate the probability mass function (if it exists) at a value.

  • x: The value.

Return: the probability mass.

realize

function realize()

Instantiate the associated delayed random variate.

simulate

function simulate() -> Value

Simulate a random variate.

Return: the value.

upper

function upper() -> Value?

Finite upper bound of the support of this node, if any.