summaryrefslogtreecommitdiff
path: root/lib/GSL/gsl-aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/GSL/gsl-aux.c')
-rw-r--r--lib/GSL/gsl-aux.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/GSL/gsl-aux.c b/lib/GSL/gsl-aux.c
index 0e8406c..c602d5e 100644
--- a/lib/GSL/gsl-aux.c
+++ b/lib/GSL/gsl-aux.c
@@ -471,9 +471,9 @@ int QR(KRMAT(x),RMAT(q),RMAT(r)) {
471 OK 471 OK
472} 472}
473 473
474int chol(KRMAT(x),RMAT(l)) { 474int cholR(KRMAT(x),RMAT(l)) {
475 REQUIRES(xr==xc && lr==xr && lr==lc,BAD_SIZE); 475 REQUIRES(xr==xc && lr==xr && lr==lc,BAD_SIZE);
476 DEBUGMSG("chol"); 476 DEBUGMSG("cholR");
477 KDMVIEW(x); 477 KDMVIEW(x);
478 DMVIEW(l); 478 DMVIEW(l);
479 gsl_matrix_memcpy(M(l),M(x)); 479 gsl_matrix_memcpy(M(l),M(x));
@@ -488,6 +488,23 @@ int chol(KRMAT(x),RMAT(l)) {
488 OK 488 OK
489} 489}
490 490
491int cholC(KCMAT(x),CMAT(l)) {
492 REQUIRES(xr==xc && lr==xr && lr==lc,BAD_SIZE);
493 DEBUGMSG("cholC");
494 KCMVIEW(x);
495 CMVIEW(l);
496 gsl_matrix_complex_memcpy(M(l),M(x));
497 int res = 0; // gsl_linalg_complex_cholesky_decomp(M(l));
498 CHECK(res,res);
499 gsl_complex zero = {0.,0.};
500 int r,c;
501 for (r=0; r<xr-1; r++) {
502 for(c=r+1; c<xc; c++) {
503 lp[r*lc+c] = zero;
504 }
505 }
506 OK
507}
491 508
492int fft(int code, KCVEC(X), CVEC(R)) { 509int fft(int code, KCVEC(X), CVEC(R)) {
493 REQUIRES(Xn == Rn,BAD_SIZE); 510 REQUIRES(Xn == Rn,BAD_SIZE);