expokit_dgpadm {kexpmv} | R Documentation |
This function exponentiates a matrix via the EXPOKIT padm function.
expokit_dgpadm(mat = NULL, t = 15, transpose_needed = TRUE)
mat |
an input square matrix. |
t |
time value to exponentiate by. |
transpose_needed |
If TRUE (default), matrix will be transposed. |
From EXPOKIT:
* Computes exp(t*H), the matrix exponential of a general matrix in
* full, using the irreducible rational Pade approximation to the
* exponential function exp(x) = r(x) = (+/-)( I + 2*(q(x)/p(x)) ),
* combined with scaling-and-squaring.
This function is recommended when dealing with small dense matrices. However it can also be used for large sparse matrices when the infinity norm is approximately >100.
Meabh G. McCurdy mmccurdy01@qub.ac.uk
Nicholas J. Matzke nickmatzke.ncse@gmail.com
# Define input matrix to be exponentiated mat=matrix(c(-0.071207, 0.065573, 0.005634, 0, -0.041206, 0.041206, 0, 0, 0), nrow=3, byrow=TRUE) # Define value of t t=15 # Exponentiate with EXPOKIT's dgpadm Pmat = expokit_dgpadm(mat=mat, t=t, transpose_needed=TRUE) print(Pmat)