You are here: Symbol Reference > Sparse Namespace > Classes > TSparseMtx Class > public > TSparseMtx.SvdSymSmallest Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TSparseMtx.SvdSymSmallest Method

Computes smallest singular values and signular ectors for a symmetric sparse matrix.

Pascal
function SvdSymSmallest(const S: TVec; const Residuals: TVec; const V: TMtx; DesiredSCount: integer; RightVectors: boolean = false; const fpm: TIntegerArray = nil): integer; overload;
Parameters 
Description 
Returns the singular values.  
Returns left singular vectors in rows. Pass nil for this paramter, if you dont require singular vectors,  
RightVectors 
When V is not nil, left singular vectors are returned by default. Set this parameter to True, to obtain right singular vectors.  
fpm 
Optional: processing parameter list. Leave nil, to use default values. If you do pass this parameter, its length must be minimum 129 items. (Reference: Intel MKL manual).  
Returns the relative residual vector  
DesiredEigCount 
The function will return up to DesiredEigCount smallest eigen values.  
fpm[0] 
0 Reserved for future use.  
fpm[1] 
6 Defines the tolerance for the stopping criteria: tol = 10-pm 1 + 1  
fpm[2] 
0 Specifies the algorithm to use: • 0 - Decided at runtime • 1 - The Krylov-Schur method • 2 - Subspace Iteration technique based on FEAST algorithm  
fpm[3] 
This parameter is referenced only for Krylov-Schur Method. It indicates the number of Lanczos/Arnoldi vectors (NCV) generated at each iteration. This parameter must be less than or equal to size of matrix and greater than number of eigenvalues (k0) to be computed. If unspecified, NCV is set to be at least 1.5 times larger than k0.  
fpm[4] 
Maximum number of iterations. If unspecified, this parameter is set to 10000 for the Krylov-Schur method and 60 for the subspace iteration method.  
fpm[5] 
0 Power of Chebychev expansion for approximate spectral projector. Only referenced when pm[2]=1  
fpm[6] 
1 Used only for Krylov-Schur Method. If 0, then the method only computes eigenvalues. If 1, then the method computes eigenvalues and eigenvectors. The subspace iteration method always computes eigenvectors/singular vectors. You must allocate the required memory space.  
fpm[7] 
Convergence stopping criteria.  
fpm[8] 
Specifies if for detecting convergence the solver must compute the true residuals for eigenpairs for the Krylov-Schur method or it can only use the residual norm estimates. If 0, only residual norm estimates are used. If 1, the solver computes not just residual norm estimates but also the true residuals as defined in the description of pm[7].  
fpm[9] 
Used only for the Krylov-Schur method and only as an output parameter. Reports the reason for exiting the iteration loop of the method: • If 0, the iterations stopped since convergence has been detected. • If -1, maximum number of iterations has been reached and even the residual norm estimates have not converged. • If -2, maximum number of iterations has been reached despite the residual norm estimates have converged (but the true residuals for eigenpairs have not). • If -3, the iterations stagnated and even the residual norm estimates have not converged. • If -4, the iterations stagnated while the eigenvalues have converged (but the true residuals for eigenpairs do not).  
fpm[10..128] 
reserved 

The function will return the number of actually found eigen-values. If there was an error during evaluation, an exception will be raised with an error message.

The sparse matrix must be symmetric and it must use full storage. 

Important:

  • The routine does not check, if the matrix is symmetric.
  • Inclusion of explicit zero valued elements could cause access violation.
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!