diff options
Diffstat (limited to 'lib/Numeric/GSL/gsl-aux.c')
-rw-r--r-- | lib/Numeric/GSL/gsl-aux.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/Numeric/GSL/gsl-aux.c b/lib/Numeric/GSL/gsl-aux.c index c602d5e..83c3bf8 100644 --- a/lib/Numeric/GSL/gsl-aux.c +++ b/lib/Numeric/GSL/gsl-aux.c | |||
@@ -471,6 +471,33 @@ int QR(KRMAT(x),RMAT(q),RMAT(r)) { | |||
471 | OK | 471 | OK |
472 | } | 472 | } |
473 | 473 | ||
474 | int QRpacked(KRMAT(x),RMAT(qr),RVEC(tau)) { | ||
475 | //REQUIRES(xr==rr && xc==rc && qr==qc && xr==qr,BAD_SIZE); | ||
476 | DEBUGMSG("QRpacked"); | ||
477 | KDMVIEW(x); | ||
478 | DMVIEW(qr); | ||
479 | DVVIEW(tau); | ||
480 | //gsl_matrix * a = gsl_matrix_alloc(xr,xc); | ||
481 | //gsl_vector * tau = gsl_vector_alloc(MIN(xr,xc)); | ||
482 | gsl_matrix_memcpy(M(qr),M(x)); | ||
483 | int res = gsl_linalg_QR_decomp(M(qr),V(tau)); | ||
484 | CHECK(res,res); | ||
485 | OK | ||
486 | } | ||
487 | |||
488 | |||
489 | int QRunpack(KRMAT(xqr),KRVEC(tau),RMAT(q),RMAT(r)) { | ||
490 | //REQUIRES(xr==rr && xc==rc && qr==qc && xr==qr,BAD_SIZE); | ||
491 | DEBUGMSG("QRunpack"); | ||
492 | KDMVIEW(xqr); | ||
493 | KDVVIEW(tau); | ||
494 | DMVIEW(q); | ||
495 | DMVIEW(r); | ||
496 | gsl_linalg_QR_unpack(M(xqr),V(tau),M(q),M(r)); | ||
497 | OK | ||
498 | } | ||
499 | |||
500 | |||
474 | int cholR(KRMAT(x),RMAT(l)) { | 501 | int cholR(KRMAT(x),RMAT(l)) { |
475 | REQUIRES(xr==xc && lr==xr && lr==lc,BAD_SIZE); | 502 | REQUIRES(xr==xc && lr==xr && lr==lc,BAD_SIZE); |
476 | DEBUGMSG("cholR"); | 503 | DEBUGMSG("cholR"); |