| createEngine | R Documentation |
Create the C++ object to set up SIMD vectorization for speeding up calculations for Zigzag-HMC ("Zigzag-HMC engine").
createEngine(
dimension,
lowerBounds,
upperBounds,
seed,
mean,
precision,
flags = 128L
)
dimension |
the dimension of MTN. |
lowerBounds |
a vector specifying the lower bounds. |
upperBounds |
a vector specifying the upper bounds. |
seed |
random seed. |
mean |
the mean vector. |
precision |
the precision matrix. |
flags |
which SIMD instruction set to use. 128 = SSE, 256 = AVX. |
a list whose only element is the Zigzag-HMC engine object.
setMean(), setPrecision(), zigzagHMC(), markovianZigzag()
# Create a 2D engine with simple bounds
dimension <- 2
lowerBounds <- c(-1, -1)
upperBounds <- c(1, 1)
mean <- c(0, 0)
precision <- matrix(c(1, 0.5, 0.5, 1), nrow = 2)
engine <- createEngine(dimension, lowerBounds, upperBounds,
seed = 123, mean, precision, flags = 128)
# Check the engine structure
str(engine)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.