C++ main module for mmsd Package  1.0
dfullmatrix_functions.h
Go to the documentation of this file.
1 #ifndef DFULLMATRIX_FUNCTIONS
2 #define DFULLMATRIX_FUNCTIONS
3 
4 #include "lapack_functions.h"
5 
34  const tLVectorIncrement& incx,
35  const double* x,
36  const tBoolean& isTransposed,
37  const tLVectorIndex& nRows,//number of viewed rows of A
38  const tLVectorIndex& nCols,//number of viewed columns of A
39  const tLVectorIndex& ldaA,//memory distance between A[i][j] and A[i][j+1]
40  const double* A,
41  const lapack_real& alpha,
42  const lapack_real& beta,
43  const tLVectorIndex& ly,
44  const tLVectorIncrement& incy,
45  double* y);
46 
47 
61 void DoubleFullUpperMatrixVectorProduct( const tBoolean& isTransA,
62  const tLVectorIndex& nRowsA,//number of viewed rows of A
63  const tLVectorIndex& ldA,//memory distance between A[i][j] and A[i][j+1]
64  const double* A,
65  const tLVectorIndex& nX,
66  const tLVectorIncrement& incX,
67  double* x) ;
68 
69 // DGEMM - perform one of the matrix-matrix operations
70 // C:=alpha*op( A )*op( B ) + beta*C, where op( X ) is one of
71 //
72 // op( X ) = X or op( X ) = X**T,
73 // alpha and beta are scalars, and A, B and C are matrices, with op( A )
74 // an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
75 
77  const tLVectorIndex& nACols,
78  const tLVectorIndex& ldA,
79  const double* A,
80  const tLVectorIndex& nBRows,
81  const tLVectorIndex& nBCols,
82  const tLVectorIndex& ldB,
83  const double* B,
84  const tBoolean& isTrA,
85  const tBoolean& isTrB,
86  const lapack_real& alpha,
87  const lapack_real& beta,
88  const tLVectorIndex& nCRows,
89  const tLVectorIndex& nCCols,
90  const tLVectorIndex& ldC,
91  double *C);
92 
93 
94 
95 //eigen decomposition
96 //=====================
97  /* DGEEV computes for an N-by-N real nonsymmetric matrix A, the
98  * eigenvalues and, optionally, the left and/or right eigenvectors.
99  *
100  * The right eigenvector v(j) of A satisfies
101  * A * v(j) = lambda(j) * v(j)
102  * where lambda(j) is its eigenvalue.
103  * The left eigenvector u(j) of A satisfies
104  * u(j)**H * A = lambda(j) * u(j)**H
105  * where u(j)**H denotes the conjugate transpose of u(j).
106  *
107  * The computed eigenvectors are normalized to have Euclidean norm
108  * equal to 1 and largest component real.
109  */
111  const tLVectorIndex& nCols,
112  const tLVectorIndex& ld,
113  double* A,
114  const tLVectorIndex& nU,
115  double* U,
116  double* C);
117 
118 
119 //LU factorization
121  const tLVectorIndex& nCols,
122  const tLVectorIndex& ld,
123  double* A,
124  lapack_int *LU_pivots);
125 
126 //inversion of matrix
127 /* DGETRI computes the inverse of a matrix using the LU factorization
128  * computed by DGETRF.
129 *
130 * This method inverts U and then computes inv(A) by solving the system
131 * inv(A)*L = inv(U) for inv(A).
132 */
133 
134 bool DoubleFullMatrixInverse(const tLVectorIndex& nRows,
135  const tLVectorIndex& nCols,
136  const tLVectorIndex& ld,
137  const lapack_int* ipiv,
138  double* A);
139 /*
140  * DGETRS solves a system of linear equations
141  * A * X = B or A**T * X = B
142  * with a general N-by-N matrix A using the LU factorization computed
143  * by DGETRF.
144  */
145 //AX=B X->B
146 //
148  const tLVectorIndex& nACols,
149  const tLVectorIndex& nAMaxRows,
150  const tLVectorIndex& nAMaxCols,
151  const tLVectorIndex& ldA,
152  const tBoolean& isTransA,
153  const lapack_int *ipiv,
154  const double* A,
155  const tLVectorIndex& nBRows,
156  const tLVectorIndex& nBCols,
157  const tLVectorIndex& ldB,
158  double *B);
159 
160 //QR factorization
161 //===============
162 
163 /* DTRSM solves one of the matrix equations
164  *
165  * op( A )*X = alpha*B, or X*op( A ) = alpha*B,
166  *
167  * where alpha is a scalar, X and B are m by n matrices, A is a unit, or
168  * non-unit, upper or lower triangular matrix and op( A ) is one of
169  *
170  * op( A ) = A or op( A ) = A**T.
171  *
172  * The matrix X is overwritten on B.
173  */
174 
176  const tLVectorIndex& nCols,
177  const tLVectorIndex& nMaxRows,
178  const tLVectorIndex& nMaxCols,
179  const tLVectorIndex& ld,
180  double* A,
181  const tBoolean& isOnlyQ);
182 /*
183  * DGEQP3 computes a QR factorization with column pivoting of a
184  * matrix A: A*P = Q*R using Level 3 BLAS.
185  */
186 /* DORGQR generates an M-by-N real matrix Q with orthonormal columns,
187  * which is defined as the first N columns of a product of K elementary
188  * reflectors of order M
189  *
190  * Q = H(1) H(2) . . . H(k)
191  *
192  * as returned by DGEQRF.*/
193 
195  const tLVectorIndex& nCols,
196  const tLVectorIndex& nMaxRows,
197  const tLVectorIndex& nMaxCols,
198  const tLVectorIndex& ld,
199  double* A,
200  const tBoolean& isOnlyQ);
201 
202 
203 #endif
#define lapack_int
Definition: lapack_functions.h:7
#define tBoolean
Definition: types.h:48
void DoubleFullUpperMatrixVectorProduct(const tBoolean &isTransA, const tLVectorIndex &nRowsA, const tLVectorIndex &ldA, const double *A, const tLVectorIndex &nX, const tLVectorIncrement &incX, double *x)
compute X=op(A). X where op(A)=A or op(A)=tA where A is Upper matrix
Definition: dfulluppermatrix_functions.cpp:125
#define lapack_real
Definition: lapack_functions.h:9
int DoubleFullMatrixPQRFactorization(const tLVectorIndex &nRows, const tLVectorIndex &nCols, const tLVectorIndex &nMaxRows, const tLVectorIndex &nMaxCols, const tLVectorIndex &ld, double *A, const tBoolean &isOnlyQ)
Definition: dfullmatrix_functions.cpp:819
int DoubleFullMatrixLUFactorization(const tLVectorIndex &nRows, const tLVectorIndex &nCols, const tLVectorIndex &ld, double *A, lapack_int *LU_pivots)
Definition: dfullmatrix_functions.cpp:561
bool DoubleFullMatrixInverse(const tLVectorIndex &nRows, const tLVectorIndex &nCols, const tLVectorIndex &ld, const lapack_int *ipiv, double *A)
Definition: dfullmatrix_functions.cpp:614
void DoubleFullMatrixMatrixProduct(const tLVectorIndex &nARows, const tLVectorIndex &nACols, const tLVectorIndex &ldA, const double *A, const tLVectorIndex &nBRows, const tLVectorIndex &nBCols, const tLVectorIndex &ldB, const double *B, const tBoolean &isTrA, const tBoolean &isTrB, const lapack_real &alpha, const lapack_real &beta, const tLVectorIndex &nCRows, const tLVectorIndex &nCCols, const tLVectorIndex &ldC, double *C)
Definition: dfullmatrix_functions.cpp:309
bool DoubleFullMatrixSolveMatrixEquation(const tLVectorIndex &nARows, const tLVectorIndex &nACols, const tLVectorIndex &nAMaxRows, const tLVectorIndex &nAMaxCols, const tLVectorIndex &ldA, const tBoolean &isTransA, const lapack_int *ipiv, const double *A, const tLVectorIndex &nBRows, const tLVectorIndex &nBCols, const tLVectorIndex &ldB, double *B)
Definition: dfullmatrix_functions.cpp:671
int DoubleFullMatrixQRFactorization(const tLVectorIndex &nRows, const tLVectorIndex &nCols, const tLVectorIndex &nMaxRows, const tLVectorIndex &nMaxCols, const tLVectorIndex &ld, double *A, const tBoolean &isOnlyQ)
Definition: dfullmatrix_functions.cpp:744
#define tLVectorIndex
Definition: lapack_types.h:13
int DoubleFullMatrixEigenValues(const tLVectorIndex &nRows, const tLVectorIndex &nCols, const tLVectorIndex &ld, double *A, const tLVectorIndex &nU, double *U, double *C)
Definition: dfullmatrix_functions.cpp:442
void DoubleFullMatrixVectorProduct(const tLVectorIndex &lx, const tLVectorIncrement &incx, const double *x, const tBoolean &isTransposed, const tLVectorIndex &nRows, const tLVectorIndex &nCols, const tLVectorIndex &ldaA, const double *A, const lapack_real &alpha, const lapack_real &beta, const tLVectorIndex &ly, const tLVectorIncrement &incy, double *y)
compute Y=beta.Y + alpha op(A). X where op(A)=A or op(A)=tA
Definition: dfullmatrix_functions.cpp:185
#define tLVectorIncrement
Definition: lapack_types.h:16