File: sgelsx

package info (click to toggle)
ruby-lapack 1.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 28,552 kB
  • sloc: ansic: 191,612; ruby: 3,934; makefile: 8
file content (148 lines) | stat: -rwxr-xr-x 5,095 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
--- 
:name: sgelsx
:md5sum: e4e07c42aeca28db21674ddeedfea311
:category: :subroutine
:arguments: 
- m: 
    :type: integer
    :intent: input
- n: 
    :type: integer
    :intent: input
- nrhs: 
    :type: integer
    :intent: input
- a: 
    :type: real
    :intent: input/output
    :dims: 
    - lda
    - n
- lda: 
    :type: integer
    :intent: input
- b: 
    :type: real
    :intent: input/output
    :dims: 
    - ldb
    - nrhs
- ldb: 
    :type: integer
    :intent: input
- jpvt: 
    :type: integer
    :intent: input/output
    :dims: 
    - n
- rcond: 
    :type: real
    :intent: input
- rank: 
    :type: integer
    :intent: output
- work: 
    :type: real
    :intent: workspace
    :dims: 
    - MAX((MIN(m,n))+3*n,2*(MIN(m,n))*nrhs)
- info: 
    :type: integer
    :intent: output
:substitutions: {}

:fortran_help: "      SUBROUTINE SGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK, INFO )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  This routine is deprecated and has been replaced by routine SGELSY.\n\
  *\n\
  *  SGELSX computes the minimum-norm solution to a real linear least\n\
  *  squares problem:\n\
  *      minimize || A * X - B ||\n\
  *  using a complete orthogonal factorization of A.  A is an M-by-N\n\
  *  matrix which may be rank-deficient.\n\
  *\n\
  *  Several right hand side vectors b and solution vectors x can be \n\
  *  handled in a single call; they are stored as the columns of the\n\
  *  M-by-NRHS right hand side matrix B and the N-by-NRHS solution\n\
  *  matrix X.\n\
  *\n\
  *  The routine first computes a QR factorization with column pivoting:\n\
  *      A * P = Q * [ R11 R12 ]\n\
  *                  [  0  R22 ]\n\
  *  with R11 defined as the largest leading submatrix whose estimated\n\
  *  condition number is less than 1/RCOND.  The order of R11, RANK,\n\
  *  is the effective rank of A.\n\
  *\n\
  *  Then, R22 is considered to be negligible, and R12 is annihilated\n\
  *  by orthogonal transformations from the right, arriving at the\n\
  *  complete orthogonal factorization:\n\
  *     A * P = Q * [ T11 0 ] * Z\n\
  *                 [  0  0 ]\n\
  *  The minimum-norm solution is then\n\
  *     X = P * Z' [ inv(T11)*Q1'*B ]\n\
  *                [        0       ]\n\
  *  where Q1 consists of the first RANK columns of Q.\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  M       (input) INTEGER\n\
  *          The number of rows of the matrix A.  M >= 0.\n\
  *\n\
  *  N       (input) INTEGER\n\
  *          The number of columns of the matrix A.  N >= 0.\n\
  *\n\
  *  NRHS    (input) INTEGER\n\
  *          The number of right hand sides, i.e., the number of\n\
  *          columns of matrices B and X. NRHS >= 0.\n\
  *\n\
  *  A       (input/output) REAL array, dimension (LDA,N)\n\
  *          On entry, the M-by-N matrix A.\n\
  *          On exit, A has been overwritten by details of its\n\
  *          complete orthogonal factorization.\n\
  *\n\
  *  LDA     (input) INTEGER\n\
  *          The leading dimension of the array A.  LDA >= max(1,M).\n\
  *\n\
  *  B       (input/output) REAL array, dimension (LDB,NRHS)\n\
  *          On entry, the M-by-NRHS right hand side matrix B.\n\
  *          On exit, the N-by-NRHS solution matrix X.\n\
  *          If m >= n and RANK = n, the residual sum-of-squares for\n\
  *          the solution in the i-th column is given by the sum of\n\
  *          squares of elements N+1:M in that column.\n\
  *\n\
  *  LDB     (input) INTEGER\n\
  *          The leading dimension of the array B. LDB >= max(1,M,N).\n\
  *\n\
  *  JPVT    (input/output) INTEGER array, dimension (N)\n\
  *          On entry, if JPVT(i) .ne. 0, the i-th column of A is an\n\
  *          initial column, otherwise it is a free column.  Before\n\
  *          the QR factorization of A, all initial columns are\n\
  *          permuted to the leading positions; only the remaining\n\
  *          free columns are moved as a result of column pivoting\n\
  *          during the factorization.\n\
  *          On exit, if JPVT(i) = k, then the i-th column of A*P\n\
  *          was the k-th column of A.\n\
  *\n\
  *  RCOND   (input) REAL\n\
  *          RCOND is used to determine the effective rank of A, which\n\
  *          is defined as the order of the largest leading triangular\n\
  *          submatrix R11 in the QR factorization with pivoting of A,\n\
  *          whose estimated condition number < 1/RCOND.\n\
  *\n\
  *  RANK    (output) INTEGER\n\
  *          The effective rank of A, i.e., the order of the submatrix\n\
  *          R11.  This is the same as the order of the submatrix T11\n\
  *          in the complete orthogonal factorization of A.\n\
  *\n\
  *  WORK    (workspace) REAL array, dimension\n\
  *                      (max( min(M,N)+3*N, 2*min(M,N)+NRHS )),\n\
  *\n\
  *  INFO    (output) INTEGER\n\
  *          = 0:  successful exit\n\
  *          < 0:  if INFO = -i, the i-th argument had an illegal value\n\
  *\n\n\
  *  =====================================================================\n\
  *\n"