getMarkovianZigzagSample: Draw one Markovian zigzag sample

View source: R/zigzagMarkovian.R

getMarkovianZigzagSampleR Documentation

Draw one Markovian zigzag sample

Description

Simulate the Markovian zigzag dynamics for a given position over a specified travel time.

Usage

getMarkovianZigzagSample(position, velocity = NULL, engine, travelTime)

Arguments

position

a d-dimensional position vector.

velocity

optional d-dimensional velocity vector. If NULL, it will be generated within the function.

engine

an object representing the Markovian zigzag engine, typically containing settings and state required for the simulation.

travelTime

the duration for which the dynamics are simulated.

Value

A list containing the position and velocity after simulating the dynamics.

See Also

markovianZigzag()

Examples

# First create an engine
set.seed(123)
engine <- createEngine(
  dimension = 2,
  lowerBounds = c(-1, -1),
  upperBounds = c(1, 1),
  seed = 123,
  mean = c(0, 0),
  precision = diag(2)
)

# Draw a single Markovian zigzag sample
position <- c(0.1, -0.2)
travel_time <- 0.5
sample_result <- getMarkovianZigzagSample(
  position = position,
  engine = engine,
  travelTime = travel_time
)
sample_result

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