Servers
For both symmetric and nonsymmetric eigenvalue problems, you can increase your control over the computation of the decomposition by using an eigenvalue server object.
There are two nonsymmetric eigenvalue server classes:
Both types of servers can be configured to return only selected eigenvectors. Here is how to use the
RWHessEigServer<double> to compute only the first five right eigenvectors:
#include <iostream>
#include <rw/lapack/eigsrv.h>
int main()
{
RWGenMat<double> A; // 1
std::cin >> A;
RWHessEigServer<double> server; // 2
server.computeLeftEigenVectors(true); // 3
server.selectEigenVectors(RWRange(0,4)); // 4
RWEigDecomp<double> decomp = server(A); // 5
std::cout << decomp.rightEigenVectors() << std::endl;
return 0;
}