Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

6.4 Computing Selected Eigenvalues

Often you require only some of the eigenvalues: either all the eigenvalues in a range of real numbers (a,b), or the ith through jth eigenvalues. You can solve these problems using the server objects DoubleSymRangeEigServer and DoubleSymSomeEigServer. In addition to showing how to solve this specific problem, this section demonstrates how to use a server object to adjust an algorithm's parameters.

This program computes the eigenvalues of the matrix A in the range (a,b). Eigenvectors are not computed.

//1First, the matrix and the range are read in from standard input.
//2When the eigenvalue server is constructed, the algorithm parameters are all set to default values.
//3Here we change the setting of a parameter so that only eigenvalues, and not eigenvectors, are computed.
//4Here we set the range in which we are interested and ...
//5We compute the decomposition.

If instead of needing all the eigenvalues in a certain range, you need the ith through jth eigenvalues, you use a DoubleSymSomeEigServer object like this:

The program is the same as the previous program except for //1, where we set the range of interest. The range is set using one of the subscripting objects RWSlice, RWRange, or RWToEnd. See the Math.h++ User's Guide and Reference Manual for more information on the subscripting objects.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.