Closed jiahao closed 9 years ago
Thanks Jiahao, that's a great idea. I will implement this matrix very soon.
I have implemented this matrix. The test matrix used in the paper can be generated as
matrixdepot("rosser", 8, 2, 1)
.
matrixdepot("rosser", n)
generate similar test matrices, but n
needs to be a power of 2.
I used Sylvester's method for constructing orthogonal matrices P. Strictly speaking, P are
not orthogonal matrices but matrices have the property P' * P = alpha * eye(n)
, where
alpha
is a scalar. For matrixdepot("rosser", n, 2, 1)
, where n>2
, we have P'* P = 10 * eye(n)
.
Rosser's matrix is a classic challenge problem for eigenvalue algorithms. Would be interesting to provide more general test matrices from a similar construction, see Appendix A of [1] and, e.g., David Gross's blog post on the topic. The most general case would use Sylvester's method for constructing orthogonal matrices [2] to mix up the matrices of interest; however, it may be simpler to forego staying in the integer field and simply apply a random arbitrary rotation matrix
Q = qrfact!(randn(n,n))[:Q]
.References: