mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +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;
|
||||
|
||||
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;
|
||||
|
||||
wa2 = diag.cwise() * x;
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
template <typename Scalar>
|
||||
template <typename Scalar>
|
||||
void ei_qrsolv(int n, Scalar *r__, int ldr,
|
||||
const int *ipvt, const Scalar *diag, const Scalar *qtb, Scalar *x,
|
||||
Scalar *sdiag, Scalar *wa)
|
||||
Scalar *sdiag)
|
||||
{
|
||||
/* System generated locals */
|
||||
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;
|
||||
int nsing;
|
||||
Scalar qtbpj;
|
||||
Matrix< Scalar, Dynamic, 1 > wa(n+1);
|
||||
|
||||
/* Parameter adjustments */
|
||||
--wa;
|
||||
--sdiag;
|
||||
--x;
|
||||
--qtb;
|
||||
|
Loading…
Reference in New Issue
Block a user