reduce ei_qrsolv() signature, wa is actually a 'working array'

This commit is contained in:
Thomas Capricelli 2009-11-26 03:26:41 +01:00
parent 746c787a76
commit e95f736402
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;