expAv | R Documentation |
Calculates expm(A) %*% v
using plain series summation. The number of terms is determined adaptively when uniformization=TRUE
.
The uniformization method essentially pushes the spectrum of the operator inside a zero centered disc, within which a uniform error bound is available.
If A
is a generator matrix (i.e. expm(A)
is a probability matrix) and if v
is a probability vector, then the relative error of the result is bounded by tol
.
expAv(A, v, transpose = FALSE, uniformization = TRUE, tol = 1e-08, ...)
A |
Sparse matrix (usually a generator) |
v |
Vector (or matrix) |
transpose |
Calculate |
uniformization |
Use uniformization method? |
tol |
Accuracy if A is a generator matrix and v a probability vector. |
... |
Extra configuration parameters |
Additional supported arguments via ...
currently include:
Nmax
Use no more than this number of terms even if the spcified accuracy cannot be met.
warn
Give warning if number of terms is truncated by Nmax
.
trace
Trace the number of terms when it adaptively changes.
Vector (or matrix)
Grassmann, W. K. (1977). Transient solutions in Markovian queueing systems. Computers & Operations Research, 4(1), 47–53.
Sherlock, C. (2021). Direct statistical inference for finite Markov jump processes via the matrix exponential. Computational Statistics, 36(4), 2863–2887.
set.seed(1); A <- Matrix::rsparsematrix(5, 5, .5)
expAv(A, 1:5) ## Matrix::expm(A) %*% 1:5
F <- MakeTape(function(x) expAv(A*x, 1:5), 1)
F(1)
F(2) ## More terms needed => trigger retaping
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.