![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Singular value decomposition WITH the singular vectors, and the Moore-Penrose pseudo-inverse built from it. More...
#include <cstddef>#include <vector>#include "line/util/eig.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::SvdFactors |
| A = U diag(s) Vt, with U (m x m), s of length min(m,n) and Vt (n x n). More... | |
Namespaces | |
| namespace | line |
| Conservation laws of a layered queueing network, enumerated from its structure. | |
Functions | |
| SvdFactors | line::svd_full (const Matrix< double > &A) |
| Full SVD of a real matrix, singular values in descending order. | |
| Matrix< double > | line::pinv (const Matrix< double > &A) |
| Moore-Penrose pseudo-inverse, A^+ = V diag(1/s_i) U^T over the singular values above max(m,n) eps sigma_1, which is MATLAB's default pinv tolerance. | |
Singular value decomposition WITH the singular vectors, and the Moore-Penrose pseudo-inverse built from it.
util/eig.h already exposes the singular VALUES (dgesvd with jobu = jobvt = 'N'), which is all the rank and conditioning tests need. This header adds the factors themselves, for the one place in the port that needs them: the pinv fallback of ldqbd_R, taken when a level's local block is singular.
DOUBLE ONLY, for the same reason eig.h is: singular values of a rational matrix are algebraic, not rational, so there is no exact instantiation to offer, and LAPACK has no multiprecision path. Callers templated on T must convert and state the precision loss at the call site. Configured without LAPACK the entry points throw UnsupportedError naming the dependency rather than substituting anything.
dgesvd is reached through line::lapack (lapack.h, included by eig.h), the one place in the tree that declares or loads a LAPACK routine.
Definition in file svd.h.