vdraw_sc_step_regular_cpp {nhppp} | R Documentation |
Vectorized sampling from NHPPPs with piecewise constant intensities with same interval lengths (C++)
Description
Simulate a piecewise constant-rate Poisson Point Process over (t_min, t_max]
(inversion method)
where the intervals have the same length (are "regular").
Usage
vdraw_sc_step_regular_cpp(
lambda_matrix = NULL,
Lambda_matrix = NULL,
range_t = NULL,
subinterval = NULL,
tol = 10^-6,
atmost1 = FALSE,
atmostB = NULL
)
Arguments
lambda_matrix |
(matrix) intensity rates, one per interval |
Lambda_matrix |
(matrix) integrated intensity rates at the end of each interval |
range_t |
(vector, double) |
subinterval |
(matrix, double) subinterval of |
tol |
(scalar, double) tolerance for the number of events |
atmost1 |
boolean, draw at most 1 event time |
atmostB |
If not NULL, draw at most B (B>0) event times. NULL means ignore. |
Value
a vector of event times t if no events realize, it will have 0 length
Examples
x <- vdraw_sc_step_regular(Lambda_matrix = matrix(1:5, nrow = 1))
[Package nhppp version 0.1.4 Index]