QR_MUMPS
Functions/Subroutines
qrm_detect_singletons.F90 File Reference

this file contains the routine that performs the detection of singletons More...

Go to the source code of this file.

Functions/Subroutines

subroutine _qrm_detect_singletons (graph, scol, srow, mrperm, mcperm, nrsing, ncsing)
 This subroutine detects singletons in a matrix. More...
 
integer function flip (i)
 
integer function unflip (i)
 

Detailed Description

this file contains the routine that performs the detection of singletons

Date
2016-01-29 22:22:30 +0100 (Fri, 29 Jan 2016)
Author
abuttari
Version
1.1
Revision
2075

Definition in file qrm_detect_singletons.F90.

Function/Subroutine Documentation

subroutine _qrm_detect_singletons ( type(_qrm_spmat_type graph,
integer, dimension(:), allocatable  scol,
integer, dimension(:), allocatable  srow,
integer, dimension(:), allocatable  mrperm,
integer, dimension(:), allocatable  mcperm,
integer  nrsing,
integer  ncsing 
)

This subroutine detects singletons in a matrix.

For more deatils please refer to:

[1] T. Davis "Multifrontal multithreaded rank-revealing sparse QR factorization" Accepted for publication on ACM TOMS, 2010

The following code largely gathers from the SPQR package singleton detection. Once the singletons are detected, the graph is purged by eliminating all the singleton rows and columns

Parameters
[in]graphthe input graph by columns (a qrm_spmat in csc format)
[out]scolit is a pointer to integer(:) and on output it will return the set of singletons. Need not be allocated on entry but on exit it will be of size graphn
[out]srowit is a pointer to integer(:) and on output it will return the column singletons. Need not be allocated on entry but on exit it will be of size graphn
[out]mrperman integer array storing the mapping to the row indices of the purged matrix. mrperm(j) = k means that column j of the purged graph corresponds to column k in the original matrix. A row permutation is later computed on the purged matrix and, thus, mrperm will be used to map this permutation back on the original matrix.
[out]mcperman integer array storing the mapping to the row indices of the purged matrix. mcperm(j) = k means that row j of the purged graph corresponds to row k in the original matrix. Because the ordering method will be executed on the purged graph, this array is necessary to map the computed ordering onto the columns of A.
[out]ncsingthe number of column singletons found
[out]nrsingthe number of row singletons found

Definition at line 82 of file qrm_detect_singletons.F90.

References _qrm_spmat_mod::_qrm_spmat_convert(), _qrm_spmat_mod::_qrm_spmat_destroy(), flip(), and unflip().

Referenced by _qrm_analyse().

integer function _qrm_detect_singletons::flip ( integer  i)

Definition at line 303 of file qrm_detect_singletons.F90.

integer function _qrm_detect_singletons::unflip ( integer  i)

Definition at line 310 of file qrm_detect_singletons.F90.