LAPACK.h++ provides three implementations for least squares factorization objects:
Cholesky. The Cholesky decomposition method forms a Cholesky decomposition of the system's normal equations. It is only suitable for full rank problems. While it is not as accurate or robust as the other methods, it is the fastest of the three.
QR. The QR method uses the QR decomposition of the system matrix for nonsingular problems, or a complete orthogonal decomposition if the system is rank deficient numerically. The QR method is accurate and robust, but does not offer as robust control over the rank deficiency tolerance as the SVD method.
SVD. The SVD (singular value decomposition) method constructs an SVD of the system matrix. This method is not as fast as the other two, but is very robust for problems of near singularity and is as accurate as the QR method.
Objects using all three methods are available. Each object has an identical interface, so switching from one method to the other is easy: you just change the include file and the class name. The names of the least squares classes are encoded as {TYPE}LeastSq{METHOD}, where {TYPE} is the precision of the factorization, and {METHOD} is Ch for the Cholesky factorization, QR for the QR method, and SVD for the SVD method. For example, FloatLeastSqCh is the least squares class that takes float as its type and Cholesky as its method.
>©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.