draw_sc_step_regular {nhppp}R Documentation

Sampling from NHPPPs with piecewise constant intensities with same interval lengths (non-vectorized)

Description

Sampling from NHPPPs with piecewise constant intensities with same interval lengths (non-vectorized)

Usage

draw_sc_step_regular(
  Lambda_vector = NULL,
  lambda_vector = NULL,
  range_t = c(0, 10),
  rng_stream = NULL,
  atmost1 = FALSE,
  atleast1 = FALSE
)

Arguments

Lambda_vector

(scalar, double) K integrated intensity rates at the end of each interval

lambda_vector

(scalar, double) K constant intensity rates, one per interval

range_t

(vector, double) t_min and t_max

rng_stream

an rstream object

atmost1

boolean, draw at most 1 event time

atleast1

boolean, draw at least 1 event time

Value

a vector of event times t if no events realize, it will have 0 length

Examples

x <- draw_sc_step_regular(Lambda_vector = 1:5, range_t = c(0, 5))

[Package nhppp version 0.1.4 Index]