| act_eigfun.spectral | R Documentation | 
Apply a function to a Hermitian matrix based on the representation
given by class spectral.
## S3 method for class 'spectral'
act_eigfun(object, FUN, ...)
object | 
 an instance of class   | 
FUN | 
 the function to be applied to the matrix.  | 
... | 
 further arguments passed on to   | 
The matrix resulting from the application of FUN.
A Hermitian Matrix admits the spectral decomposition
H = \sum_k \lambda_k E_k
where \lambda_k are its eigenvalues and E_k the
orthogonal projector onto the \lambda_k-eigenspace.
If f=FUN is defined on the eigenvalues of H, then
act_eigfun performs the following calculation
f(H) = \sum_k f(\lambda_k) E_k
spectral(), act_eigfun()
H <- matrix(c(0,1,1,1,0,1,1,1,0), nrow=3)
decomp <- spectral(H)
# Calculates H^2.
act_eigfun(decomp, FUN = function(x) x^2)
# Calculates sin(H).
act_eigfun(decomp, FUN = function(x) sin(x))
# Calculates H^3.
act_eigfun(decomp, FUN = function(x, y) x^y, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.