| getHarmonicSample | R Documentation |
One-step Harmonic HMC Sampler (Whitened Coordinates)
getHarmonicSample(
whitenedPosition,
whitenedConstraints,
integrationTime,
diagnosticMode = FALSE,
seed = NULL
)
whitenedPosition |
Position in whitened coordinates |
whitenedConstraints |
List from |
integrationTime |
Time for dynamics simulation |
diagnosticMode |
Return bounce diagnostics |
seed |
random seed |
harmonicHMC()
# Basic usage with whitened coordinates
set.seed(123)
whitened_pos <- c(0.1, -0.2, 0.3)
# Create example whitened constraints
whitened_constraints <- list(
direc = matrix(c(1, 0, 0, 0, 1, 0), nrow = 2, byrow = TRUE),
direcRowNormSq = c(1, 1),
bound = c(-0.5, -0.5)
)
result <- getHarmonicSample(
whitenedPosition = whitened_pos,
whitenedConstraints = whitened_constraints,
integrationTime = pi/4
)
result
# With diagnostics enabled
result_diag <- getHarmonicSample(
whitenedPosition = whitened_pos,
whitenedConstraints = whitened_constraints,
integrationTime = pi/4,
diagnosticMode = TRUE
)
str(result_diag)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.