drawLaplaceMomentum: Draw a random Laplace momentum

View source: R/helpers.R

drawLaplaceMomentumR Documentation

Draw a random Laplace momentum

Description

Generate a d-dimensional momentum where the density of each element is proportional to exp(-|pi|).

Usage

drawLaplaceMomentum(d)

Arguments

d

dimension of the momentum.

Value

a d-dimensional Laplace-distributed momentum.

See Also

zigzagHMC()

Examples

# Draw a 3-dimensional Laplace momentum with reproducible results
set.seed(3)
momentum <- drawLaplaceMomentum(3)
momentum

hdtg documentation built on Feb. 11, 2026, 5:07 p.m.