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

RWSVServer<T,SVDCalc>

Module:  Linear Algebra   Group:  Decomposition classes


Does not inherit

Local Index

Members

Synopsis

#include <rw/lapack/sv.h>
#include <rw/lapack/svddccalc.h>

RWSVServer<double, RWSVDDivConqCalc<double> > server;

Description

The singular value decomposition server class, RWSVServer<T>, is used to construct instances of the singular value decomposition class, RWSVDecomp<T>. Using a server rather than the standard singular value decomposition constructor gives you control over what is computed.

The template parameter <SVDCalc> determines the algorithm used by the RWSVDecomp<T> class to compute the singular value decomposition and must implement the following method:


NOTE -- For greater flexibility, the user can implement this method, or the Linear Algebra Module provides two classes to perform this function - RWSVDCalc<T> and RWSVDDivConqCalc<T>. Please see their descriptions in this reference guide for more information.

bool computeSVD(const RWGenMat<T>& A,
RWGenMat<T>& U,
RWGenMat<T>& VT,
RWMathVec<norm_type>& sigma,
norm_type tolerance,
int numLeftVecs = -1
int numRightVecs = -1);

where norm_type is a typedef for rw_numeric_traits<T>::norm_type.

Parameters:

A - The input matrix for which the singular value decomposition is being computed.

U - The output matrix of left singular victors (the columns of U are the left singular vectors).

VT - The output matrix of right singular victors (the rows of VT are the right singular victors).

sigma - The output vector of singular values in descending order.

tolerance - The input singular values with magnitude less than tolerance will be set to zero.

numLeftVectors - The input number of left vectors to compute. If the number is less than zero, the default number of vectors will be computed (it is up to the developer to determine what the default is).

numRightVectors - The input number of right vectors to compute. If the number is less than zero, the default number of vectors will be computed (it is up to the developer to determine what the default is).

The return value is True if the decomposition was successfully computed.

Example

Public Constructor

RWSVServer();

Public Member Functions

void
computeAllLeftVectors();
void
computeAllRightVectors();
void
computeAllVectors();
void
computeDefaultLeftVectors();
void
computeDefaultRightVectors();
void
computeDefaultVectors();
void
computeLeftVectors(unsigned n);
void
computeRightVectors(unsigned n);
void
computeVectors(unsigned n);
void
RWSVServer<float>::setTolerance(float tol);
void
RWSVServer<double>::setTolerance(double tol);
void
RWSVServer<DComplex>::setTolerance(double tol);

Public Member Operator

RWSVDecomp<T,SVDCalc>      operator()(const RWGenMat<T>&);


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.