>
>#include <rw/dsv.h> // DoubleSVServer #include <rw/fsv.h> // FloatSVServer #include <rw/csv.h> // DComplexSVServer DoubleSVServer server; DoubleSVDecomp sv = server(A); // A is an RWGenMat<double>
The singular value decomposition server classes, {TYPE}SVServer, are used to construct instances of the singular value decomposition class, {TYPE}SVDecomp. Using a server rather than the standard singular value decomposition constructor gives you control over what is computed.
>// Read a matrix from standard input and print its singular // values. Use a SV decomposition server to prevent computing // the singular vectors. #include <iostream.h> #include <rw/dsv.h> main() { RWGenMat<double> A; cin >> A; DoubleSVServer server; server.computeVectors(0); // compute zero vectors DoubleSVDecomp SV = server(A); cout << "Singular values are " << SV.SingularValues()>
<< endl; }
DoubleSVServer(); FloatSVServer(); DComplexSVServer();
Default constructor. Builds a new server, which computes all singular vectors by default.
void FloatSVServer::computeAllLeftVectors(); void DoubleSVServer::computeAllLeftVectors(); void DComplexSVServer::computeAllLeftVectors();
Configures the server to compute all left singular vectors.
void FloatSVServer::computeAllRightVectors(); void DoubleSVServer::computeAllRightVectors(); void DComplexSVServer::computeAllRightVectors();
Configures the server to compute all right singular vectors.
void FloatSVServer::computeAllVectors(); void DoubleSVServer::computeAllVectors(); void DComplexSVServer::computeAllVectors();
Configures the server to compute the first min(m,n) singular vectors, where m x n is the size of the input matrix.
void FloatSVServer::computeDefaultLeftVectors(); void DoubleSVServer::computeDefaultLeftVectors(); void DComplexSVServer::computeDefaultLeftVectors();
Configures the server to compute the first min(m,n) left singular vectors, where m x n is the size of the input matrix.
void FloatSVServer::computeDefaultRightVectors(); void DoubleSVServer::computeDefaultRightVectors(); void DComplexSVServer::computeDefaultRightVectors();
Configures the server to compute the first min(m,n) right singular vectors, where m x n is the size of the input matrix.
void FloatSVServer::computeDefaultVectors(); void DoubleSVServer::computeDefaultVectors(); void DComplexSVServer::computeDefaultVectors();
Configures the server to compute all singular vectors.
void FloatSVServer::computeLeftVectors(unsigned n); void DoubleSVServer::computeLeftVectors(unsigned n); void DComplexSVServer::computeLeftVectors(unsigned n);
Configures the server to compute the first n left singular vectors.
void FloatSVServer::computeRightVectors(unsigned n); void DoubleSVServer::computeRightVectors(unsigned n); void DComplexSVServer::computeRightVectors(unsigned n);
Configures the server to compute the first n right singular vectors.
void FloatSVServer::computeVectors(unsigned n); void DoubleSVServer::computeVectors(unsigned n); void DComplexSVServer::computeVectors(unsigned n);
Configures the server to compute the first n singular vectors.
void FloatSVServer::setTolerance(float tol); void DoubleSVServer::setTolerance(double tol); void DComplexSVServer::setTolerance(double tol);
Specifies an accuracy to which the singular values should be computed.
FloatSVDecomp operator()(const RWGenMat<float>&); DoubleSVDecomp operator()(const RWGenMat<double>&); DComplexSVDecomp operator()(const RWGenMat<DComplex>&);
Computes a singular value decomposition.
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.