isHermitian {cmvnorm} | R Documentation |
Is a Matrix Hermitian?
Description
Returns TRUE
if a matrix is Hermitian or Hermitian positive-definite
Usage
isHermitian(x, tol = 100 * .Machine$double.eps)
ishpd(x,tol= 100 * .Machine$double.eps)
zapim(x,tol= 100 * .Machine$double.eps)
Arguments
x |
A square matrix |
tol |
Tolerance for numerical scruff |
Details
Functions isHermitian()
and ishpd()
return a Boolean,
indicating whether the argument is Hermitian or Hermitian positive
definite respectively. Function zapim()
zaps small imaginary
parts of a vector, returning real if all elements are so zapped.
Author(s)
Robin K. S. Hankin
Examples
v <- 2^(1:30)
zapim(v+1i*exp(-v))
ishpd(matrix(c(1,0.1i,-0.1i,1),2,2)) # should be TRUE
isHermitian(matrix(c(1,3i,-3i,1),2,2)) # should be TRUE
ishpd(rcwis(6,2)) # should be TRUE
[Package cmvnorm version 1.0-7 Index]