Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Linear Algebra Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

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 RWSymRangeEigServer<double> and RWeSymSomeEigServer<double>. 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 RWSymSomeEigServer<double> 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 Essential Math Module User's Guide and the class descriptions in the Essential Math Module Reference Guide for more information on the subscripting objects.



Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.