⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linalg.texi

📁 用于VC.net的gsl的lib库文件包
💻 TEXI
📖 第 1 页 / 共 3 页
字号:
the @math{QRP^T} decomposition @math{A = Q R P^T}.  On output the
diagonal and upper triangular part of the input matrix contain the
matrix @math{R}. The permutation matrix @math{P} is stored in the
permutation @var{p}.  The sign of the permutation is given by
@var{signum}. It has the value @math{(-1)^n}, where @math{n} is the
number of interchanges in the permutation. The vector @var{tau} and the
columns of the lower triangular part of the matrix @var{A} contain the
Householder coefficients and vectors which encode the orthogonal matrix
@var{Q}.  The vector @var{tau} must be of length @math{k=\min(M,N)}. The
matrix @math{Q} is related to these components by, @math{Q = Q_k ... Q_2
Q_1} where @math{Q_i = I - \tau_i v_i v_i^T} and @math{v_i} is the
Householder vector @math{v_i =
(0,...,1,A(i+1,i),A(i+2,i),...,A(m,i))}. This is the same storage scheme
as used by @sc{lapack}.  The vector @var{norm} is workspace of length
@var{N} used for column pivoting.

The algorithm used to perform the decomposition is Householder QR with
column pivoting (Golub & Van Loan, @cite{Matrix Computations}, Algorithm
5.4.1).
@end deftypefun

@deftypefun int gsl_linalg_QRPT_decomp2 (const gsl_matrix * @var{A}, gsl_matrix * @var{q}, gsl_matrix * @var{r}, gsl_vector * @var{tau}, gsl_permutation * @var{p}, int *@var{signum}, gsl_vector * @var{norm})
This function factorizes the matrix @var{A} into the decomposition
@math{A = Q R P^T} without modifying @var{A} itself and storing the
output in the separate matrices @var{q} and @var{r}.
@end deftypefun

@deftypefun int gsl_linalg_QRPT_solve (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x})
This function solves the system @math{A x = b} using the @math{QRP^T}
decomposition of @math{A} into (@var{QR}, @var{tau}, @var{p}) given by
@code{gsl_linalg_QRPT_decomp}.
@end deftypefun

@deftypefun int gsl_linalg_QRPT_svx (const gsl_matrix * @var{QR}, const gsl_vector * @var{tau}, const gsl_permutation * @var{p}, gsl_vector * @var{x})
This function solves the system @math{A x = b} in-place using the
@math{QRP^T} decomposition of @math{A} into
(@var{QR},@var{tau},@var{p}). On input @var{x} should contain the
right-hand side @math{b}, which is replaced by the solution on output.
@end deftypefun

@deftypefun int gsl_linalg_QRPT_QRsolve (const gsl_matrix * @var{Q}, const gsl_matrix * @var{R}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x})
This function solves the system @math{R P^T x = Q^T b} for @var{x}. It can
be used when the @math{QR} decomposition of a matrix is available in
unpacked form as (@var{Q},@var{R}).
@end deftypefun

@deftypefun int gsl_linalg_QRPT_update (gsl_matrix * @var{Q}, gsl_matrix * @var{R}, const gsl_permutation * @var{p}, gsl_vector * @var{u}, const gsl_vector * @var{v})
This function performs a rank-1 update @math{w v^T} of the @math{QRP^T}
decomposition (@var{Q}, @var{R},@var{p}). The update is given by
@math{Q'R' = Q R + w v^T} where the output matrices @math{Q'} and
@math{R'} are also orthogonal and right triangular. Note that @var{w} is
destroyed by the update. The permutation @var{p} is not changed.
@end deftypefun

@deftypefun int gsl_linalg_QRPT_Rsolve (const gsl_matrix * @var{QR}, const gsl_permutation * @var{p}, const gsl_vector * @var{b}, gsl_vector * @var{x})
This function solves the triangular system @math{R P^T x = b} for the
@math{N}-by-@math{N} matrix @math{R} contained in @var{QR}.
@end deftypefun

@deftypefun int gsl_linalg_QRPT_Rsvx (const gsl_matrix * @var{QR}, const gsl_permutation * @var{p}, gsl_vector * @var{x})
This function solves the triangular system @math{R P^T x = b} in-place
for the @math{N}-by-@math{N} matrix @math{R} contained in @var{QR}. On
input @var{x} should contain the right-hand side @math{b}, which is
replaced by the solution on output.
@end deftypefun

@node Singular Value Decomposition
@section Singular Value Decomposition
@cindex SVD
@cindex singular value decomposition

A general rectangular @math{M}-by-@math{N} matrix @math{A} has a
singular value decomposition (@sc{svd}) into the product of an
@math{M}-by-@math{N} orthogonal matrix @math{U}, an @math{N}-by-@math{N}
diagonal matrix of singular values @math{S} and the transpose of an
@math{N}-by-@math{N} orthogonal square matrix @math{V},

@tex
\beforedisplay
$$
A = U S V^T
$$
\afterdisplay
@end tex
@ifinfo
@example
A = U S V^T
@end example
@end ifinfo
@noindent
The singular values
@c{$\sigma_i = S_{ii}$}
@math{\sigma_i = S_@{ii@}} are all non-negative and are
generally chosen to form a non-increasing sequence 
@c{$\sigma_1 \ge \sigma_2 \ge ... \ge \sigma_N \ge 0$}
@math{\sigma_1 >= \sigma_2 >= ... >= \sigma_N >= 0}.

The singular value decomposition of a matrix has many practical uses.
The condition number of the matrix is given by the ratio of the largest
singular value to the smallest singular value. The presence of a zero
singular value indicates that the matrix is singular. The number of
non-zero singular values indicates the rank of the matrix.  In practice
singular value decomposition of a rank-deficient matrix will not produce
exact zeroes for singular values, due to finite numerical
precision. Small singular values should be edited by choosing a suitable
tolerance.

@deftypefun int gsl_linalg_SV_decomp (gsl_matrix * @var{A}, gsl_matrix * @var{V}, gsl_vector * @var{S}, gsl_vector * @var{work})
This function factorizes the @math{M}-by-@math{N} matrix @var{A} into
the singular value decomposition @math{A = U S V^T}. On output the
matrix @var{A} is replaced by @math{U}. The diagonal elements of the
singular value matrix @math{S} are stored in the vector @var{S}. The
singular values are non-negative and form a non-increasing sequence from
@math{S_1} to @math{S_N}. The matrix @var{V} contains the elements of
@math{V} in untransposed form. To form the product @math{U S V^T} it is
necessary to take the transpose of @var{V}.  A workspace of length
@var{N} is required in @var{work}.

This routine uses the Golub-Reinsch SVD algorithm.
@end deftypefun

@deftypefun int gsl_linalg_SV_decomp_mod (gsl_matrix * @var{A}, gsl_matrix * @var{X}, gsl_matrix * @var{V}, gsl_vector * @var{S}, gsl_vector * @var{work})
This function computes the SVD using the modified Golub-Reinsch
algorithm, which is faster for @c{$M \gg N$}
@math{M>>N}.  It requires the vector
@var{work} and the @math{N}-by-@math{N} matrix @var{X} as additional
working space.
@end deftypefun

@deftypefun int gsl_linalg_SV_decomp_jacobi (gsl_matrix * @var{A}, gsl_matrix * @var{V}, gsl_vector * @var{S})
This function computes the SVD using one-sided Jacobi orthogonalization
(see references for details).  The Jacobi method can compute singular
values to higher relative accuracy than Golub-Reinsch algorithms.
@end deftypefun

@deftypefun int gsl_linalg_SV_solve (gsl_matrix * @var{U}, gsl_matrix * @var{V}, gsl_vector * @var{S}, const gsl_vector * @var{b}, gsl_vector * @var{x})
This function solves the system @math{A x = b} using the singular value
decomposition (@var{U}, @var{S}, @var{V}) of @math{A} given by
@code{gsl_linalg_SV_decomp}.

Only non-zero singular values are used in computing the solution. The
parts of the solution corresponding to singular values of zero are
ignored.  Other singular values can be edited out by setting them to
zero before calling this function. 

In the over-determined case where @var{A} has more rows than columns the
system is solved in the least squares sense, returning the solution
@var{x} which minimizes @math{||A x - b||_2}.
@end deftypefun

@node Cholesky Decomposition
@section Cholesky Decomposition
@cindex Cholesky decomposition
@cindex square root of a matrix, Cholesky decomposition
@cindex matrix square root, Cholesky decomposition

A symmetric, positive definite square matrix @math{A} has a Cholesky
decomposition into a product of a lower triangular matrix @math{L} and
its transpose @math{L^T},

@tex
\beforedisplay
$$
A = L L^T
$$
\afterdisplay
@end tex
@ifinfo
@example
A = L L^T
@end example
@end ifinfo
@noindent
This is sometimes referred to as taking the square-root of a matrix. The
Cholesky decomposition can only be carried out when all the eigenvalues
of the matrix are positive.  This decomposition can be used to convert
the linear system @math{A x = b} into a pair of triangular systems
(@math{L y = b}, @math{L^T x = y}), which can be solved by forward and
back-substitution.

@deftypefun int gsl_linalg_cholesky_decomp (gsl_matrix * @var{A})
This function factorizes the positive-definite square matrix @var{A}
into the Cholesky decomposition @math{A = L L^T}. On output the diagonal
and lower triangular part of the input matrix @var{A} contain the matrix
@math{L}. The upper triangular part of the input matrix contains
@math{L^T}, the diagonal terms being identical for both @math{L} and
@math{L^T}.  If the matrix is not positive-definite then the
decomposition will fail, returning the error code @code{GSL_EDOM}.
@end deftypefun

@deftypefun int gsl_linalg_cholesky_solve (const gsl_matrix * @var{cholesky}, const gsl_vector * @var{b}, gsl_vector * @var{x})
This function solves the system @math{A x = b} using the Cholesky
decomposition of @math{A} into the matrix @var{cholesky} given by
@code{gsl_linalg_cholesky_decomp}.
@end deftypefun

@deftypefun int gsl_linalg_cholesky_svx (const gsl_matrix * @var{cholesky}, gsl_vector * @var{x})
This function solves the system @math{A x = b} in-place using the
Cholesky decomposition of @math{A} into the matrix @var{cholesky} given
by @code{gsl_linalg_cholesky_decomp}. On input @var{x} should contain
the right-hand side @math{b}, which is replaced by the solution on
output.
@end deftypefun

@node Tridiagonal Decomposition of Real Symmetric Matrices
@section Tridiagonal Decomposition of Real Symmetric Matrices
@cindex  tridiagonal decomposition

A symmetric matrix @math{A} can be factorized by similarity
transformations into the form,

@tex
\beforedisplay
$$
A = Q T Q^T
$$
\afterdisplay
@end tex
@ifinfo
@example
A = Q T Q^T
@end example
@end ifinfo
@noindent
where @math{Q} is an orthogonal matrix and @math{T} is a symmetric
tridiagonal matrix.

@deftypefun int gsl_linalg_symmtd_decomp (gsl_matrix * @var{A}, gsl_vector * @var{tau})
This function factorizes the symmetric square matrix @var{A} into the
symmetric tridiagonal decomposition @math{Q T Q^T}.  On output the
diagonal and subdiagonal part of the input matrix @var{A} contain the
tridiagonal matrix @math{T}.  The remaining lower triangular part of the
input matrix contains the Householder vectors which, together with the
Householder coefficients @var{tau}, encode the orthogonal matrix
@math{Q}. This storage scheme is the same as used by @sc{lapack}.  The
upper triangular part of @var{A} is not referenced.
@end deftypefun

@deftypefun int gsl_linalg_symmtd_unpack (const gsl_matrix * @var{A}, const gsl_vector * @var{tau}, gsl_matrix * @var{Q}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag})
This function unpacks the encoded symmetric tridiagonal decomposition
(@var{A}, @var{tau}) obtained from @code{gsl_linalg_symmtd_decomp} into
the orthogonal matrix @var{Q}, the vector of diagonal elements @var{diag}
and the vector of subdiagonal elements @var{subdiag}.  
@end deftypefun

@deftypefun int gsl_linalg_symmtd_unpack_T (const gsl_matrix * @var{A}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag})
This function unpacks the diagonal and subdiagonal of the encoded
symmetric tridiagonal decomposition (@var{A}, @var{tau}) obtained from
@code{gsl_linalg_symmtd_decomp} into the vectors @var{diag} and @var{subdiag}.
@end deftypefun

@node Tridiagonal Decomposition of Hermitian Matrices
@section Tridiagonal Decomposition of Hermitian Matrices
@cindex tridiagonal decomposition

A hermitian matrix @math{A} can be factorized by similarity
transformations into the form,

@tex
\beforedisplay
$$
A = U T U^T
$$
\afterdisplay
@end tex
@ifinfo
@example
A = U T U^T
@end example
@end ifinfo
@noindent
where @math{U} is an unitary matrix and @math{T} is a real symmetric
tridiagonal matrix.


@deftypefun int gsl_linalg_hermtd_decomp (gsl_matrix_complex * @var{A}, gsl_vector_complex * @var{tau})
This function factorizes the hermitian matrix @var{A} into the symmetric
tridiagonal decomposition @math{U T U^T}.  On output the real parts of
the diagonal and subdiagonal part of the input matrix @var{A} contain
the tridiagonal matrix @math{T}.  The remaining lower triangular part of
the input matrix contains the Householder vectors which, together with
the Householder coefficients @var{tau}, encode the orthogonal matrix
@math{Q}. This storage scheme is the same as used by @sc{lapack}.  The
upper triangular part of @var{A} and imaginary parts of the diagonal are
not referenced.
@end deftypefun

@deftypefun int gsl_linalg_hermtd_unpack (const gsl_matrix_complex * @var{A}, const gsl_vector_complex * @var{tau}, gsl_matrix_complex * @var{Q}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag})
This function unpacks the encoded tridiagonal decomposition (@var{A},
@var{tau}) obtained from @code{gsl_linalg_hermtd_decomp} into the
unitary matrix @var{U}, the real vector of diagonal elements @var{diag} and
the real vector of subdiagonal elements @var{subdiag}. 
@end deftypefun

@deftypefun int gsl_linalg_hermtd_unpack_T (const gsl_matrix_complex * @var{A}, gsl_vector * @var{diag}, gsl_vector * @var{subdiag})
This function unpacks the diagonal and subdiagonal of the encoded
tridiagonal decomposition (@var{A}, @var{tau}) obtained from
@code{gsl_linalg_hermtd_decomp} into the real vectors @var{diag} and
@var{subdiag}.
@end deftypefun

@node Bidiagonalization
@section Bidiagonalization 
@cindex bidiagonalization of real matrices

A general matrix @math{A} can be factorized by similarity
transformations into the form,

@tex
\beforedisplay
$$
A = U B V^T

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -