LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine slarge ( integer N, real, dimension( lda, * ) A, integer LDA, integer, dimension( 4 ) ISEED, real, dimension( * ) WORK, integer INFO )

SLARGE

Purpose:
``` SLARGE pre- and post-multiplies a real general n by n matrix A
with a random orthogonal matrix: A = U*D*U'.```
Parameters
 [in] N ``` N is INTEGER The order of the matrix A. N >= 0.``` [in,out] A ``` A is REAL array, dimension (LDA,N) On entry, the original n by n matrix A. On exit, A is overwritten by U*A*U' for some random orthogonal matrix U.``` [in] LDA ``` LDA is INTEGER The leading dimension of the array A. LDA >= N.``` [in,out] ISEED ``` ISEED is INTEGER array, dimension (4) On entry, the seed of the random number generator; the array elements must be between 0 and 4095, and ISEED(4) must be odd. On exit, the seed is updated.``` [out] WORK ` WORK is REAL array, dimension (2*N)` [out] INFO ``` INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value```
Date
November 2011

Definition at line 89 of file slarge.f.

89 *
90 * -- LAPACK auxiliary routine (version 3.4.0) --
91 * -- LAPACK is a software package provided by Univ. of Tennessee, --
92 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
93 * November 2011
94 *
95 * .. Scalar Arguments ..
96  INTEGER info, lda, n
97 * ..
98 * .. Array Arguments ..
99  INTEGER iseed( 4 )
100  REAL a( lda, * ), work( * )
101 * ..
102 *
103 * =====================================================================
104 *
105 * .. Parameters ..
106  REAL zero, one
107  parameter ( zero = 0.0e+0, one = 1.0e+0 )
108 * ..
109 * .. Local Scalars ..
110  INTEGER i
111  REAL tau, wa, wb, wn
112 * ..
113 * .. External Subroutines ..
114  EXTERNAL sgemv, sger, slarnv, sscal, xerbla
115 * ..
116 * .. Intrinsic Functions ..
117  INTRINSIC max, sign
118 * ..
119 * .. External Functions ..
120  REAL snrm2
121  EXTERNAL snrm2
122 * ..
123 * .. Executable Statements ..
124 *
125 * Test the input arguments
126 *
127  info = 0
128  IF( n.LT.0 ) THEN
129  info = -1
130  ELSE IF( lda.LT.max( 1, n ) ) THEN
131  info = -3
132  END IF
133  IF( info.LT.0 ) THEN
134  CALL xerbla( 'SLARGE', -info )
135  RETURN
136  END IF
137 *
138 * pre- and post-multiply A by random orthogonal matrix
139 *
140  DO 10 i = n, 1, -1
141 *
142 * generate random reflection
143 *
144  CALL slarnv( 3, iseed, n-i+1, work )
145  wn = snrm2( n-i+1, work, 1 )
146  wa = sign( wn, work( 1 ) )
147  IF( wn.EQ.zero ) THEN
148  tau = zero
149  ELSE
150  wb = work( 1 ) + wa
151  CALL sscal( n-i, one / wb, work( 2 ), 1 )
152  work( 1 ) = one
153  tau = wb / wa
154  END IF
155 *
156 * multiply A(i:n,1:n) by random reflection from the left
157 *
158  CALL sgemv( 'Transpose', n-i+1, n, one, a( i, 1 ), lda, work,
159  \$ 1, zero, work( n+1 ), 1 )
160  CALL sger( n-i+1, n, -tau, work, 1, work( n+1 ), 1, a( i, 1 ),
161  \$ lda )
162 *
163 * multiply A(1:n,i:n) by random reflection from the right
164 *
165  CALL sgemv( 'No transpose', n, n-i+1, one, a( 1, i ), lda,
166  \$ work, 1, zero, work( n+1 ), 1 )
167  CALL sger( n, n-i+1, -tau, work( n+1 ), 1, work, 1, a( 1, i ),
168  \$ lda )
169  10 CONTINUE
170  RETURN
171 *
172 * End of SLARGE
173 *
subroutine sger(M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
SGER
Definition: sger.f:132
subroutine slarnv(IDIST, ISEED, N, X)
SLARNV returns a vector of random numbers from a uniform or normal distribution.
Definition: slarnv.f:99
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine sgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
SGEMV
Definition: sgemv.f:158
real function snrm2(N, X, INCX)
SNRM2
Definition: snrm2.f:56
subroutine sscal(N, SA, SX, INCX)
SSCAL
Definition: sscal.f:55

Here is the call graph for this function:

Here is the caller graph for this function:
{"ft_lang_label":"__label__en","ft_lang_prob":0.7125775,"math_prob":0.98076266,"size":1019,"snap":"2021-43-2021-49","text_gpt3_token_len":319,"char_repetition_ratio":0.13103448,"word_repetition_ratio":0.0,"special_character_ratio":0.313052,"punctuation_ratio":0.17256637,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9687796,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-11-28T23:27:04Z\",\"WARC-Record-ID\":\"<urn:uuid:3a2a0591-6c2a-45a4-b573-97fa30576703>\",\"Content-Length\":\"26755\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:02825105-c1b4-4ce3-bf57-34434fc717f2>\",\"WARC-Concurrent-To\":\"<urn:uuid:182db5bb-e9a5-455c-9b88-5011a6ed4b33>\",\"WARC-IP-Address\":\"160.36.131.221\",\"WARC-Target-URI\":\"https://www.netlib.org/lapack/explore-html-3.6.1/d9/dcf/group__real__matgen_gae419dd66be405e47404d542eaa5e7f38.html\",\"WARC-Payload-Digest\":\"sha1:F7ISBUIRXYIR3V7GMRPPEIB27RSLZZPQ\",\"WARC-Block-Digest\":\"sha1:Z45KLS7HX77HDWNXSEEWQBX7ZOUMPZVB\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964358673.74_warc_CC-MAIN-20211128224316-20211129014316-00322.warc.gz\"}"}