Get the Schur product between eigen-projectors based on the representation of a
Hermitian Matrix given by class spectral
.
Usage
# S3 method for spectral
get_eigschur(object, id1, id2 = NULL, ...)
Arguments
- object
an instance of class
spectral
.- id1
index for the first eigenspace according to the ordered (decreasing) spectra.
- id2
index for the second eigenspace according to the ordered (decreasing) spectra. If not provided, it takes the same value as
id1
.- ...
further arguments passed to or from other methods.
Examples
# Spectra is {2, -1} with multiplicities one and two respectively.
decomp <- spectral(matrix(c(0,1,1,1,0,1,1,1,0), nrow=3))
# Returns the Schur product between the 2-projector and -1-projector.
get_eigschur(decomp, id1=2, id2=1)
#> [,1] [,2] [,3]
#> [1,] 0.2222222 -0.1111111 -0.1111111
#> [2,] -0.1111111 0.2222222 -0.1111111
#> [3,] -0.1111111 -0.1111111 0.2222222
# Returns the Schur square of the 2-projector.
get_eigschur(decomp, id1=1, id2=1)
#> [,1] [,2] [,3]
#> [1,] 0.1111111 0.1111111 0.1111111
#> [2,] 0.1111111 0.1111111 0.1111111
#> [3,] 0.1111111 0.1111111 0.1111111
# Also returns the Schur square of the 2-projector
get_eigschur(decomp, id1=1)
#> [,1] [,2] [,3]
#> [1,] 0.1111111 0.1111111 0.1111111
#> [2,] 0.1111111 0.1111111 0.1111111
#> [3,] 0.1111111 0.1111111 0.1111111