SCIP-SDP  3.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros
lapack_dsdp.c File Reference

interface methods for eigenvector computation and matrix multiplication using standard LAPACK and BLAS More...

Go to the source code of this file.

Macros

#define BMS_CALL(x)
 
#define SCIP_RealTOINT(x)   ((int) (x + 0.5))
 

Functions

Functions
SCIP_RETCODE SCIPlapackComputeEigenvectorDecomposition (BMS_BUFMEM *bufmem, int n, SCIP_Real *A, SCIP_Real *eigenvalues, SCIP_Real *eigenvectors)
 
SCIP_RETCODE SCIPlapackMatrixVectorMult (int nrows, int ncols, SCIP_Real *matrix, SCIP_Real *vector, SCIP_Real *result)
 
SCIP_RETCODE SCIPlapackMatrixMatrixMult (int nrowsA, int ncolsA, SCIP_Real *matrixA, SCIP_Bool transposeA, int nrowsB, int ncolsB, SCIP_Real *matrixB, SCIP_Bool transposeB, SCIP_Real *result)
 

Detailed Description

interface methods for eigenvector computation and matrix multiplication using standard LAPACK and BLAS

Author
Sonja Mars
Lars Schewe
Tristan Gally

Definition in file lapack_dsdp.c.

Macro Definition Documentation

#define BMS_CALL (   x)
Value:
do \
{ \
if( NULL == (x) ) \
{ \
SCIPerrorMessage("No memory in function call\n"); \
return SCIP_NOMEMORY; \
} \
} \
while( FALSE )

Checks if a BMSallocMemory-call was successfull, otherwise returns SCIP_NOMEMORY

Definition at line 56 of file lapack_dsdp.c.

Referenced by SCIPlapackComputeEigenvectorDecomposition().

#define SCIP_RealTOINT (   x)    ((int) (x + 0.5))

transforms a SCIP_Real (that should be integer, but might be off by some numerical error) to an integer by adding an epsilon and rounding down

Definition at line 67 of file lapack_dsdp.c.

Referenced by SCIPlapackComputeEigenvectorDecomposition().

Function Documentation

SCIP_RETCODE SCIPlapackComputeEigenvectorDecomposition ( BMS_BUFMEM *  bufmem,
int  n,
SCIP_Real *  A,
SCIP_Real *  eigenvalues,
SCIP_Real *  eigenvectors 
)

computes the eigenvector decomposition of a symmetric matrix using LAPACK

Parameters
bufmembuffer memory
nsize of matrix
Amatrix for which the decomposition should be computed
eigenvaluespointer to store eigenvalues (should be length n)
eigenvectorspointer to store eigenvectors (should be length n*n), eigenvectors are given as rows

Definition at line 219 of file lapack_dsdp.c.

References BMS_CALL, F77_FUNC, and SCIP_RealTOINT.

SCIP_RETCODE SCIPlapackMatrixVectorMult ( int  nrows,
int  ncols,
SCIP_Real *  matrix,
SCIP_Real *  vector,
SCIP_Real *  result 
)

performs matrix-vector-multiplication using BLAS

Parameters
nrowsnumber of rows in matrix
ncolsnumber of cols in matrix
matrixthe matrix we want to multiply
vectorvector we want to multiply with the matrix
resultpointer to store the resulting vector

Definition at line 321 of file lapack_dsdp.c.

References F77_FUNC.

SCIP_RETCODE SCIPlapackMatrixMatrixMult ( int  nrowsA,
int  ncolsA,
SCIP_Real *  matrixA,
SCIP_Bool  transposeA,
int  nrowsB,
int  ncolsB,
SCIP_Real *  matrixB,
SCIP_Bool  transposeB,
SCIP_Real *  result 
)

performs matrix-matrix-multiplication A*B using BLAS

Parameters
nrowsAnumber of rows in matrix A
ncolsAnumber of cols in matrix A
matrixAmatrix A given as nrowsA * ncolsA array
transposeAshould matrix A be transposed before multiplication?
nrowsBnumber of rows in matrix B
ncolsBnumber of cols in matrix B
matrixBmatrix B given as ncolsA * ncolsB array
transposeBshould matrix B be transposed before multiplication?
resultpointer to nrowsA * nrowsB array to store the resulting matrix

Definition at line 359 of file lapack_dsdp.c.

References F77_FUNC.