Go to the documentation of this file.
10 #if defined(LINK_LAPACK)
14 extern void dgemm_(
char * transa,
char * transb,
int * m,
int * n,
int * k,
15 double * alpha,
double * A,
int * lda,
double * B,
int * ldb,
16 double * beta,
double * C,
int * ldc);
18 extern void dpotrf_(
char * uplo,
int * n,
double * A,
int * lda,
int * info);
20 extern void dposv_(
char* uplo,
int* n,
int* nrhs,
double* a,
int* lda,
21 double* b,
int* ldb,
int* info);
23 extern void dsyev_(
char* jobz,
char* uplo,
int* n,
double* a,
int* lda,
24 double* w,
double* work,
int* lwork,
int* info);
90 #if defined(LINK_LAPACK)
91 double alpha = 1.0, beta = 0.0;
98 #if defined(LINK_LAPACK)
117 for (i = 0; i < Amat->
numRows; i++ ){
118 for (k = 0; k < Amat->
numCols; k++ ){
119 for (j = 0; j < Bmat->
numCols; j++ ){
135 for (i = 0; i < Amat->
numRows; i++ ){
136 for (j = 0; j < Amat->
numCols; j++ ){
152 #if defined(LINK_LAPACK)
164 TRACE(5,(
"The PSD linear system solver has not yet been implemented dependency free", info));
170 if (0 < info) TRACE(5,(
"The %i-th argument in dposv had an illegal value\n", -info));
171 if (0 > info) TRACE(5,(
"The leading minor of order %i is not positive definite\n", info));
189 TRACE(5,(
"Input dimensionality error\n"));
214 TRACE(5,(
"Could not compute the optimal work size\n"));
219 work = (
double*)malloc( lwork*
sizeof(
double) );
240 if (0 < info) TRACE(5,(
"The %i-th argument in dposv had an illegal value\n", -info));
241 if (0 > info) TRACE(5,(
"The the algorithm failed to converge; %i off-diagonal elements of an intermediate tridiagonal form did not converge to zero\n", info));
void mat_sub(matrix_double_t *Amat, matrix_double_t *Bmat, matrix_double_t *Cmat)
Matrix subtraction, C <– A - B, and asserts that this is done correctly.
void matrix_allocate(matrix_double_t *matrix, int numRows, int numCols)
Allocate memory for a matrix struct of given dimensions.
void mat_add_inplace(matrix_double_t *Amat, matrix_double_t *Bmat)
In-place matrix addition, A <– A + B, asserts that this is done correctly.
int matrix_double_solve_posdef(matrix_double_t *Amat, matrix_double_t *Bmat)
Solve the linear system AX=B, writing X into B, for PSD real A.
int matrix_double_addition_inplace(matrix_double_t *Amat, matrix_double_t *Bmat)
In-place matrix addition, A <– A + B.
void matrix_zero(matrix_double_t *matrix)
Set all antries of a matrix to zero.
void mat_eigvals(matrix_double_t *Amat, matrix_double_t *Bmat)
Computethe eigenvalues of a real symmetric A to B, asserts that this is done correctly.
Matrix object used for all matrix manipulation.
int matrix_double_subtraction_inplace(matrix_double_t *Amat, matrix_double_t *Bmat)
In-place subtraction addition, A <– A - B.
int matrix_double_transposition(matrix_double_t *Amat, matrix_double_t *ATmat)
Matrix transposition, A^T <– transpose(A)
int matrix_double_addition(matrix_double_t *Amat, matrix_double_t *Bmat, matrix_double_t *Cmat)
Matrix addition, C <– A + B.
int matrix_double_subtraction(matrix_double_t *Amat, matrix_double_t *Bmat, matrix_double_t *Cmat)
Matrix subtraction, C <– A - B.
void mat_sol(matrix_double_t *Amat, matrix_double_t *Bmat)
Compute, without changing A, the eigenvalues of a real symmetric A to B, asserts that this is done co...
void mat_trans(matrix_double_t *Amat, matrix_double_t *ATmat)
Matrix transposition, A^T <– transpose(A), asserts that this is done correctly.
int matrix_double_multiplication(matrix_double_t *Amat, matrix_double_t *Bmat, matrix_double_t *Cmat)
Matrix multiplication, C <– A * B.
void matrix_set(matrix_double_t *mat, int row, int column, double value)
Set an entry of a matrix (irrespective of the used memory layout)
void matrix_copy(matrix_double_t *Amat, matrix_double_t *Bmat)
Copy one metrix into another Bmat <– Amat, overwriting Bmat.
void mat_add(matrix_double_t *Amat, matrix_double_t *Bmat, matrix_double_t *Cmat)
Matrix addition, C <– A + B, asserts that this is done correctly.
int matrix_double_symmetric_real_eigenvalues(matrix_double_t *Amat, matrix_double_t *eigVals)
Compute, without changing A, the eigenvalues of a real symmetric A to B.
void mat_mul(matrix_double_t *Amat, matrix_double_t *Bmat, matrix_double_t *Cmat)
and asserts that this is done correctly
void mat_sub_inplace(matrix_double_t *Amat, matrix_double_t *Bmat)
In-place subtraction addition, A <– A - B, asserts that this is done correctly.
double matrix_get(matrix_double_t *mat, int row, int column)
Get an entry of a matrix (irrespective of the used memory layout)