summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/LAPACK
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/LinearAlgebra/LAPACK')
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c22
-rw-r--r--lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h6
2 files changed, 28 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
index b9c2572..7a40991 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
+++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c
@@ -1063,6 +1063,18 @@ int transR(KDMAT(x),DMAT(t)) {
1063 OK 1063 OK
1064} 1064}
1065 1065
1066int transQ(KQMAT(x),QMAT(t)) {
1067 REQUIRES(xr==tc && xc==tr,BAD_SIZE);
1068 DEBUGMSG("transQ");
1069 int i,j;
1070 for (i=0; i<tr; i++) {
1071 for (j=0; j<tc; j++) {
1072 ((complex*)tp)[i*tc+j] = ((complex*)xp)[j*xc+i];
1073 }
1074 }
1075 OK
1076}
1077
1066int transC(KCMAT(x),CMAT(t)) { 1078int transC(KCMAT(x),CMAT(t)) {
1067 REQUIRES(xr==tc && xc==tr,BAD_SIZE); 1079 REQUIRES(xr==tc && xc==tr,BAD_SIZE);
1068 DEBUGMSG("transC"); 1080 DEBUGMSG("transC");
@@ -1097,6 +1109,16 @@ int constantR(double * pval, DVEC(r)) {
1097 OK 1109 OK
1098} 1110}
1099 1111
1112int constantQ(complex* pval, QVEC(r)) {
1113 DEBUGMSG("constantQ")
1114 int k;
1115 complex val = *pval;
1116 for(k=0;k<rn;k++) {
1117 ((complex*)rp)[k]=val;
1118 }
1119 OK
1120}
1121
1100int constantC(doublecomplex* pval, CVEC(r)) { 1122int constantC(doublecomplex* pval, CVEC(r)) {
1101 DEBUGMSG("constantC") 1123 DEBUGMSG("constantC")
1102 int k; 1124 int k;
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h
index 415a6ab..d01d9e5 100644
--- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h
+++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.h
@@ -42,16 +42,20 @@ typedef short ftnlen;
42 42
43#define FVEC(A) int A##n, float*A##p 43#define FVEC(A) int A##n, float*A##p
44#define DVEC(A) int A##n, double*A##p 44#define DVEC(A) int A##n, double*A##p
45#define QVEC(A) int A##n, float*A##p
45#define CVEC(A) int A##n, double*A##p 46#define CVEC(A) int A##n, double*A##p
46#define FMAT(A) int A##r, int A##c, float* A##p 47#define FMAT(A) int A##r, int A##c, float* A##p
47#define DMAT(A) int A##r, int A##c, double* A##p 48#define DMAT(A) int A##r, int A##c, double* A##p
49#define QMAT(A) int A##r, int A##c, float* A##p
48#define CMAT(A) int A##r, int A##c, double* A##p 50#define CMAT(A) int A##r, int A##c, double* A##p
49 51
50#define KFVEC(A) int A##n, const float*A##p 52#define KFVEC(A) int A##n, const float*A##p
51#define KDVEC(A) int A##n, const double*A##p 53#define KDVEC(A) int A##n, const double*A##p
54#define KQVEC(A) int A##n, const float*A##p
52#define KCVEC(A) int A##n, const double*A##p 55#define KCVEC(A) int A##n, const double*A##p
53#define KFMAT(A) int A##r, int A##c, const float* A##p 56#define KFMAT(A) int A##r, int A##c, const float* A##p
54#define KDMAT(A) int A##r, int A##c, const double* A##p 57#define KDMAT(A) int A##r, int A##c, const double* A##p
58#define KQMAT(A) int A##r, int A##c, const float* A##p
55#define KCMAT(A) int A##r, int A##c, const double* A##p 59#define KCMAT(A) int A##r, int A##c, const double* A##p
56 60
57/********************************************************/ 61/********************************************************/
@@ -61,10 +65,12 @@ int multiplyC(int ta, int tb, KCMAT(a),KCMAT(b),CMAT(r));
61 65
62int transF(KFMAT(x),FMAT(t)); 66int transF(KFMAT(x),FMAT(t));
63int transR(KDMAT(x),DMAT(t)); 67int transR(KDMAT(x),DMAT(t));
68int transQ(KQMAT(x),QMAT(t));
64int transC(KCMAT(x),CMAT(t)); 69int transC(KCMAT(x),CMAT(t));
65 70
66int constantF(float * pval, FVEC(r)); 71int constantF(float * pval, FVEC(r));
67int constantR(double * pval, DVEC(r)); 72int constantR(double * pval, DVEC(r));
73int constantQ(complex* pval, QVEC(r));
68int constantC(doublecomplex* pval, CVEC(r)); 74int constantC(doublecomplex* pval, CVEC(r));
69 75
70int svd_l_R(KDMAT(x),DMAT(u),DVEC(s),DMAT(v)); 76int svd_l_R(KDMAT(x),DMAT(u),DVEC(s),DMAT(v));