>
>#include <rw/dqr.h> // DoubleQRDecompServer #include <rw/fqr.h> // FloatQRDecompServer #include <rw/cqr.h> // DComplexQRDecompServer DoubleQRDecompServer server;
The QR decomposition server classes, {TYPE}QRDecompServer, are used to construct instances of the QR decomposition classes, {TYPE}QRDecomp. Using a server rather than the standard QR decomposition constructor gives you control over how pivoting is done.
Normally, columns in the input matrix may be moved in order to increase the robustness of the computation of the QR decomposition. This is called pivoting. In some cases, you may want to ensure that certain columns of the input matrix are kept at the front of the QR decomposition, or you may want to disable pivoting altogether. Using a server object gives you this control.
>// Read a matrix from standard input and print its // QR decomposition. // Use a QR decomposition server to prevent pivoting. #include <iostream.h> #include <rw/dqr.h> main() { RWGenMat<double> A; cin >> A; DoubleQRDecompServer server; server.setPivoting(FALSE); DoubleQRDecomp QR = server(A); cout << "Q=" << QR.Q() << endl; cout << "R=" << QR.R() << endl; }>
DoubleQRDecompServer(); FloatQRDecompServer(); DComplexQRDecompServer();
Default constructor. Builds a new server, which does pivoting by default.
void FloatQRDecompServer::setFreeIndex(int i); void DoubleQRDecompServer::setFreeIndex(int i); void DComplexQRDecompServer::setFreeIndex(int i);
Makes i a free index, so that it may be pivoted to any column of the decomposition. Initially, all indices are free.
void FloatQRDecompServer::setInitialIndex(int i); void DoubleQRDecompServer::setInitialIndex(int i); void DComplexQRDecompServer::setInitialIndex(int i);
Moves i to an initial position in the decomposition.
void FloatQRDecompServer::setPivoting(RWBoolean); void DoubleQRDecompServer::setPivoting(RWBoolean); void DComplexQRDecompServer::setPivoting(RWBoolean);
Controls whether pivoting is done.
FloatQRDecomp operator()(const RWGenMat<float>&); DoubleQRDecomp operator()(const RWGenMat<double>&); DComplexQRDecomp operator()(const RWGenMat<DComplex>&);
Computes a QR decomposition.
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.