R wrapper of the Expokit Fortran subroutines __EXPV and
__PHIV for sparse matrix exponentiation. In general,
these routines compute the solution at time point t
of the ODE
w'(t) = x w(t) + u
with initial
condition w(0) = v.
Usage
Rexpv(a, ia, ja, n, v, t = 1, storage = "CCS", u = NULL,
anorm = max(abs(a)), Markov = FALSE, m = 30L, tol = 0,
itrace = 0L, mxstep = 10000L)
Arguments
a
numeric or complex non-zero
entries in the x-matrix.
ia
integer index/pointer. Precise meaning
depends on storage format.
ja
integer index/pointer. Precise meaning
depends on storage format.
n
dimension of the (square) matrix.
v
numeric or complex vector.
t
time. Default 1.
storage
character, one of 'CCS'
(Compressed Column Storage), 'CRS' (Compressed Row
Storage) or 'COO' (COOrdinate list). Default
'CCS'.
u
numeric or complex vector. Default
NULL.
anorm
A norm of the matrix. Default is the
sup-norm.
Markov
logical, if TRUE the
(transposed) matrix is taken to be an intensity matrix
and steps are taken to ensure that the computed result is
a probability vector. Default FALSE.
m
integer, the maximum size for the Krylov
basis.
tol
numeric. A value of 0 (default) means
square root of machine eps.
itrace
integer, 0 (default) means no trace
information from Expokit, 1 means print 'happy
breakdown', and 2 means all trace information printed
from Expokit.
mxstep
integer. Maximum allowable number of
integration steps. The value 0 means an infinite number
of steps. Default 10000.
Details
The Rexpv function is the low level wrapper of the
Fortran subroutines in the Expokit package. It is not
intended to be used directly but rather via the
expv methods. In the call the correct
storage format in terms of the vectors a,
ia and ja has to be specified via the
storage argument. For CCS, ia contains
1-based row numbers of non-zero elements and ja
contains 1-based pointers to the initial element for each
column. For CRS, ja contains 1-based column
numbers of non-zero elements and ia are 1-based
pointers to the initial element for each row. For COO,
ia and ja contain the 1-based column and
row numbers, respectively, for the non-zero elements.
Value
The solution, w, of the ODE as a numeric or
complex vector of length n.