Go to the source code of this file.
subroutine clatsp |
( |
character |
UPLO, |
|
|
integer |
N, |
|
|
complex, dimension( * ) |
X, |
|
|
integer, dimension( * ) |
ISEED |
|
) |
| |
CLATSP
- Purpose:
CLATSP generates a special test matrix for the complex symmetric
(indefinite) factorization for packed matrices. The pivot blocks of
the generated matrix will be in the following order:
2x2 pivot block, non diagonalizable
1x1 pivot block
2x2 pivot block, diagonalizable
(cycle repeats)
A row interchange is required for each non-diagonalizable 2x2 block.
- Parameters
-
[in] | UPLO | UPLO is CHARACTER
Specifies whether the generated matrix is to be upper or
lower triangular.
= 'U': Upper triangular
= 'L': Lower triangular |
[in] | N | N is INTEGER
The dimension of the matrix to be generated. |
[out] | X | X is COMPLEX array, dimension (N*(N+1)/2)
The generated matrix in packed storage format. The matrix
consists of 3x3 and 2x2 diagonal blocks which result in the
pivot sequence given above. The matrix outside these
diagonal blocks is zero. |
[in,out] | ISEED | ISEED is INTEGER array, dimension (4)
On entry, the seed for the random number generator. The last
of the four integers must be odd. (modified on exit) |
- Author
- Univ. of Tennessee
-
Univ. of California Berkeley
-
Univ. of Colorado Denver
-
NAG Ltd.
- Date
- November 2011
Definition at line 86 of file clatsp.f.
105 parameter( eye = ( 0.0, 1.0 ) )
109 REAL alpha, alpha3, beta
123 alpha = ( 1.+sqrt( 17. ) ) / 8.
124 beta = alpha - 1. / 1000.
125 alpha3 = alpha*alpha*alpha
129 DO 10 j = 1, n*( n+1 ) / 2
135 IF( uplo.EQ.
'U' )
THEN
141 a = alpha3*
clarnd( 5, iseed )
142 b =
clarnd( 5, iseed ) / alpha
148 x( jj ) =
clarnd( 2, iseed )
153 x( jj ) =
clarnd( 2, iseed )
155 x( jj ) =
clarnd( 2, iseed )
156 IF( abs( x( jj+( j-3 ) ) ).GT.abs( x( jj ) ) )
THEN
157 x( jj+( j-4 ) ) = 2.0*x( jj+( j-3 ) )
159 x( jj+( j-4 ) ) = 2.0*x( jj )
168 a = alpha3*
clarnd( 5, iseed )
169 b =
clarnd( 5, iseed ) / alpha
175 x( jj ) =
clarnd( 2, iseed )
183 x( jj ) =
clarnd( 2, iseed )
184 x( jj-j ) =
clarnd( 2, iseed )
185 IF( abs( x( jj ) ).GT.abs( x( jj-j ) ) )
THEN
186 x( jj-1 ) = 2.0*x( jj )
188 x( jj-1 ) = 2.0*x( jj-j )
190 jj = jj - j - ( j-1 )
192 ELSE IF( j.EQ.1 )
THEN
193 x( jj ) =
clarnd( 2, iseed )
205 a = alpha3*
clarnd( 5, iseed )
206 b =
clarnd( 5, iseed ) / alpha
212 x( jj ) =
clarnd( 2, iseed )
217 x( jj ) =
clarnd( 2, iseed )
219 x( jj ) =
clarnd( 2, iseed )
220 IF( abs( x( jj-( n-j-2 ) ) ).GT.abs( x( jj ) ) )
THEN
221 x( jj-( n-j-2 )+1 ) = 2.0*x( jj-( n-j-2 ) )
223 x( jj-( n-j-2 )+1 ) = 2.0*x( jj )
232 a = alpha3*
clarnd( 5, iseed )
233 b =
clarnd( 5, iseed ) / alpha
239 x( jj ) =
clarnd( 2, iseed )
247 x( jj ) =
clarnd( 2, iseed )
248 x( jj+( n-j+1 ) ) =
clarnd( 2, iseed )
249 IF( abs( x( jj ) ).GT.abs( x( jj+( n-j+1 ) ) ) )
THEN
250 x( jj+1 ) = 2.0*x( jj )
252 x( jj+1 ) = 2.0*x( jj+( n-j+1 ) )
254 jj = jj + ( n-j+1 ) + ( n-j )
256 ELSE IF( j.EQ.n )
THEN
257 x( jj ) =
clarnd( 2, iseed )
complex function clarnd(IDIST, ISEED)
CLARND