Skip to contents

A degenerate distribution with all mass at a single point.

Usage

dist_dirac(point = NULL)

Arguments

point

The point with probability mass 1.

Value

A DiracDistribution object.

Details

The parameter can be overridden with with_params = list(point = ...).

Examples

d_dirac <- dist_dirac(1.5)
d_dirac$sample(2L)
#> [1] 1.5 1.5
d_dirac$sample(2L, list(point = 42.0))
#> [1] 42 42