expokit_dgpadm: EXPOKIT dgpadm matrix exponentiation on a square matrix

Description Usage Arguments Details Author(s) Examples

View source: R/kexpmv.R

Description

This function exponentiates a matrix via the EXPOKIT padm function.

Usage

1
expokit_dgpadm(mat = NULL, t = 15, transpose_needed = TRUE)

Arguments

mat

an input square matrix.

t

time value to exponentiate by.

transpose_needed

If TRUE (default), matrix will be transposed.

Details

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.

Author(s)

Meabh G. McCurdy mmccurdy01@qub.ac.uk
Nicholas J. Matzke nickmatzke.ncse@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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)

kexpmv documentation built on May 1, 2019, 7:56 p.m.