createNutsEngine: Create a Zigzag-NUTS engine object

View source: R/RcppExports.R

createNutsEngineR Documentation

Create a Zigzag-NUTS engine object

Description

Create the C++ object to set up SIMD vectorization for speeding up calculations for Zigzag-NUTS ("Zigzag-NUTS engine").

Usage

createNutsEngine(
  dimension,
  lowerBounds,
  upperBounds,
  seed,
  stepSize,
  mean,
  precision,
  flags = 128L
)

Arguments

dimension

the dimension of MTN.

lowerBounds

a vector specifying the lower bounds.

upperBounds

a vector specifying the upper bounds.

seed

random seed.

stepSize

the base step size for Zigzag-NUTS.

mean

the mean vector.

precision

the precision matrix.

flags

which SIMD instruction set to use. 128 = SSE, 256 = AVX.

Value

a list whose only element is the Zigzag-NUTS engine object.

See Also

setMean(), setPrecision(), zigzagHMC(), createEngine()

Examples

# Create a Zigzag-NUTS engine for a 2D problem
dimension <- 2
lowerBounds <- c(-2, -2)
upperBounds <- c(2, 2)
stepSize <- 0.1
mean <- c(0.5, -0.5)
precision <- matrix(c(2, 0.3, 0.3, 2), nrow = 2)
nuts_engine <- createNutsEngine(dimension, lowerBounds, upperBounds,
                                seed = 456, stepSize, mean, precision)
str(nuts_engine)

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

Related to createNutsEngine in hdtg...