mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-22 08:52:15 +08:00
reduce ei_qrsolv() signature, wa is actually a 'working array'
This commit is contained in:
parent
746c787a76
commit
e95f736402
@ -123,7 +123,7 @@ void ei_lmpar(
|
|||||||
wa1 = temp * diag;
|
wa1 = temp * diag;
|
||||||
|
|
||||||
ipvt.cwise()+=1; // qrsolv() expects the fortran convention (as qrfac provides)
|
ipvt.cwise()+=1; // qrsolv() expects the fortran convention (as qrfac provides)
|
||||||
ei_qrsolv<Scalar>(n, r.data(), r.rows(), ipvt.data(), wa1.data(), qtb.data(), x.data(), sdiag.data(), wa2.data());
|
ei_qrsolv<Scalar>(n, r.data(), r.rows(), ipvt.data(), wa1.data(), qtb.data(), x.data(), sdiag.data());
|
||||||
ipvt.cwise()-=1;
|
ipvt.cwise()-=1;
|
||||||
|
|
||||||
wa2 = diag.cwise() * x;
|
wa2 = diag.cwise() * x;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
template <typename Scalar>
|
template <typename Scalar>
|
||||||
void ei_qrsolv(int n, Scalar *r__, int ldr,
|
void ei_qrsolv(int n, Scalar *r__, int ldr,
|
||||||
const int *ipvt, const Scalar *diag, const Scalar *qtb, Scalar *x,
|
const int *ipvt, const Scalar *diag, const Scalar *qtb, Scalar *x,
|
||||||
Scalar *sdiag, Scalar *wa)
|
Scalar *sdiag)
|
||||||
{
|
{
|
||||||
/* System generated locals */
|
/* System generated locals */
|
||||||
int r_dim1, r_offset;
|
int r_dim1, r_offset;
|
||||||
@ -12,9 +12,9 @@ void ei_qrsolv(int n, Scalar *r__, int ldr,
|
|||||||
Scalar tan__, cos__, sin__, sum, temp, cotan;
|
Scalar tan__, cos__, sin__, sum, temp, cotan;
|
||||||
int nsing;
|
int nsing;
|
||||||
Scalar qtbpj;
|
Scalar qtbpj;
|
||||||
|
Matrix< Scalar, Dynamic, 1 > wa(n+1);
|
||||||
|
|
||||||
/* Parameter adjustments */
|
/* Parameter adjustments */
|
||||||
--wa;
|
|
||||||
--sdiag;
|
--sdiag;
|
||||||
--x;
|
--x;
|
||||||
--qtb;
|
--qtb;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user