@@ -6228,117 +6228,10 @@ Lapack documentation
6228
6228
info) annotation (Library="lapack" );
6229
6229
annotation (Documentation(info="<html>
6230
6230
<p>
6231
- Lapack documentation
6231
+ Same as function <a href=\" modelica://Modelica.Math.Matrices.LAPACK.dgelsy\">LAPACK.dgelsy</a>,
6232
+ but right hand side is a vector and not a matrix.
6233
+ For details of the arguments, see documentation of dgelsy.
6232
6234
</p>
6233
- <pre>
6234
- Purpose
6235
- =======
6236
-
6237
- DGELSY computes the minimum-norm solution to a real linear least
6238
- squares problem:
6239
- minimize || A * X - B ||
6240
- using a complete orthogonal factorization of A. A is an M-by-N
6241
- matrix which may be rank-deficient.
6242
-
6243
- Several right hand side vectors b and solution vectors x can be
6244
- handled in a single call; they are stored as the columns of the
6245
- M-by-NRHS right hand side matrix B and the N-by-NRHS solution
6246
- matrix X.
6247
-
6248
- The routine first computes a QR factorization with column pivoting:
6249
- A * P = Q * [ R11 R12 ]
6250
- [ 0 R22 ]
6251
- with R11 defined as the largest leading submatrix whose estimated
6252
- condition number is less than 1/RCOND. The order of R11, RANK,
6253
- is the effective rank of A.
6254
-
6255
- Then, R22 is considered to be negligible, and R12 is annihilated
6256
- by orthogonal transformations from the right, arriving at the
6257
- complete orthogonal factorization:
6258
- A * P = Q * [ T11 0 ] * Z
6259
- [ 0 0 ]
6260
- The minimum-norm solution is then
6261
- X = P * Z' [ inv(T11)*Q1'*B ]
6262
- [ 0 ]
6263
- where Q1 consists of the first RANK columns of Q.
6264
-
6265
- This routine is basically identical to the original xGELSX except
6266
- three differences:
6267
- o The call to the subroutine xGEQPF has been substituted by
6268
- the call to the subroutine xGEQP3. This subroutine is a Blas-3
6269
- version of the QR factorization with column pivoting.
6270
- o Matrix B (the right hand side) is updated with Blas-3.
6271
- o The permutation of matrix B (the right hand side) is faster and
6272
- more simple.
6273
-
6274
- Arguments
6275
- =========
6276
-
6277
- M (input) INTEGER
6278
- The number of rows of the matrix A. M >= 0.
6279
-
6280
- N (input) INTEGER
6281
- The number of columns of the matrix A. N >= 0.
6282
-
6283
- NRHS (input) INTEGER
6284
- The number of right hand sides, i.e., the number of
6285
- columns of matrices B and X. NRHS >= 0.
6286
-
6287
- A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
6288
- On entry, the M-by-N matrix A.
6289
- On exit, A has been overwritten by details of its
6290
- complete orthogonal factorization.
6291
-
6292
- LDA (input) INTEGER
6293
- The leading dimension of the array A. LDA >= max(1,M).
6294
-
6295
- B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
6296
- On entry, the M-by-NRHS right hand side matrix B.
6297
- On exit, the N-by-NRHS solution matrix X.
6298
-
6299
- LDB (input) INTEGER
6300
- The leading dimension of the array B. LDB >= max(1,M,N).
6301
-
6302
- JPVT (input/output) INTEGER array, dimension (N)
6303
- On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
6304
- to the front of AP, otherwise column i is a free column.
6305
- On exit, if JPVT(i) = k, then the i-th column of AP
6306
- was the k-th column of A.
6307
-
6308
- RCOND (input) DOUBLE PRECISION
6309
- RCOND is used to determine the effective rank of A, which
6310
- is defined as the order of the largest leading triangular
6311
- submatrix R11 in the QR factorization with pivoting of A,
6312
- whose estimated condition number < 1/RCOND.
6313
-
6314
- RANK (output) INTEGER
6315
- The effective rank of A, i.e., the order of the submatrix
6316
- R11. This is the same as the order of the submatrix T11
6317
- in the complete orthogonal factorization of A.
6318
-
6319
- WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
6320
- On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
6321
-
6322
- LWORK (input) INTEGER
6323
- The dimension of the array WORK.
6324
- The unblocked strategy requires that:
6325
- LWORK >= MAX( MN+3*N+1, 2*MN+NRHS ),
6326
- where MN = min( M, N ).
6327
- The block algorithm requires that:
6328
- LWORK >= MAX( MN+2*N+NB*(N+1), 2*MN+NB*NRHS ),
6329
- where NB is an upper bound on the blocksize returned
6330
- by ILAENV for the routines DGEQP3, DTZRZF, STZRQF, DORMQR,
6331
- and DORMRZ.
6332
-
6333
- If LWORK = -1, then a workspace query is assumed; the routine
6334
- only calculates the optimal size of the WORK array, returns
6335
- this value as the first entry of the WORK array, and no error
6336
- message related to LWORK is issued by XERBLA.
6337
-
6338
- INFO (output) INTEGER
6339
- = 0: successful exit
6340
- < 0: If INFO = -i, the i-th argument had an illegal value.
6341
- </pre>
6342
6235
</html>" ));
6343
6236
end dgelsy_vec;
6344
6237
@@ -7572,7 +7465,7 @@ Lapack documentation
7572
7465
end dgetri;
7573
7466
7574
7467
pure function dgetrs
7575
- "Solve a system of linear equations with the LU decomposition from dgetrf"
7468
+ "Solve a system of linear equations with B matrix and the LU decomposition from dgetrf"
7576
7469
7577
7470
extends Modelica.Icons.Function;
7578
7471
input Real LU[:, size (LU, 1 )]
@@ -7653,7 +7546,7 @@ Lapack documentation
7653
7546
end dgetrs;
7654
7547
7655
7548
pure function dgetrs_vec
7656
- "Solve a system of linear equations with the LU decomposition from dgetrf"
7549
+ "Solve a system of linear equations with b vector and the LU decomposition from dgetrf"
7657
7550
7658
7551
extends Modelica.Icons.Function;
7659
7552
input Real LU[:, size (LU, 1 )]
@@ -7682,55 +7575,10 @@ Lapack documentation
7682
7575
info) annotation (Library="lapack" );
7683
7576
annotation (Documentation(info="<html>
7684
7577
<p>
7685
- Lapack documentation
7578
+ Same as function <a href=\" modelica://Modelica.Math.Matrices.LAPACK.dgetrs\">LAPACK.dgetrs</a>,
7579
+ but right hand side is a vector and not a matrix.
7580
+ For details of the arguments, see documentation of dgetrs.
7686
7581
</p>
7687
- <pre>
7688
- Purpose
7689
- =======
7690
-
7691
- DGETRS solves a system of linear equations
7692
- A * X = B or A' * X = B
7693
- with a general N-by-N matrix A using the LU factorization computed
7694
- by DGETRF.
7695
-
7696
- Arguments
7697
- =========
7698
-
7699
- TRANS (input) CHARACTER*1
7700
- Specifies the form of the system of equations:
7701
- = 'N': A * X = B (No transpose)
7702
- = 'T': A'* X = B (Transpose)
7703
- = 'C': A'* X = B (Conjugate transpose = Transpose)
7704
-
7705
- N (input) INTEGER
7706
- The order of the matrix A. N >= 0.
7707
-
7708
- NRHS (input) INTEGER
7709
- The number of right hand sides, i.e., the number of columns
7710
- of the matrix B. NRHS >= 0.
7711
-
7712
- A (input) DOUBLE PRECISION array, dimension (LDA,N)
7713
- The factors L and U from the factorization A = P*L*U
7714
- as computed by DGETRF.
7715
-
7716
- LDA (input) INTEGER
7717
- The leading dimension of the array A. LDA >= max(1,N).
7718
-
7719
- IPIV (input) INTEGER array, dimension (N)
7720
- The pivot indices from DGETRF; for 1<=i<=N, row i of the
7721
- matrix was interchanged with row IPIV(i).
7722
-
7723
- B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
7724
- On entry, the right hand side matrix B.
7725
- On exit, the solution matrix X.
7726
-
7727
- LDB (input) INTEGER
7728
- The leading dimension of the array B. LDB >= max(1,N).
7729
-
7730
- INFO (output) INTEGER
7731
- = 0: successful exit
7732
- < 0: if INFO = -i, the i-th argument had an illegal value
7733
- </pre>
7734
7582
</html>" ));
7735
7583
end dgetrs_vec;
7736
7584
0 commit comments