SCIP-SDP  4.0.0
Functions
lapack_interface.h File Reference

interface methods for eigenvector computation and matrix multiplication using openblas More...

Go to the source code of this file.

Functions

SCIP_EXPORT SCIP_RETCODE SCIPlapackComputeIthEigenvalue (BMS_BUFMEM *bufmem, SCIP_Bool geteigenvectors, int n, SCIP_Real *A, int i, SCIP_Real *eigenvalue, SCIP_Real *eigenvector)
 
SCIP_EXPORT SCIP_RETCODE SCIPlapackComputeIthEigenvalueAlternative (BMS_BUFMEM *bufmem, SCIP_Bool geteigenvectors, int n, SCIP_Real *A, int i, SCIP_Real *eigenvalue, SCIP_Real *eigenvector)
 
SCIP_EXPORT SCIP_RETCODE SCIPlapackComputeEigenvectorsNegative (BMS_BUFMEM *bufmem, int n, SCIP_Real *A, SCIP_Real tol, int *neigenvalues, SCIP_Real *eigenvalues, SCIP_Real *eigenvectors)
 
SCIP_EXPORT SCIP_RETCODE SCIPlapackComputeEigenvectorDecomposition (BMS_BUFMEM *bufmem, int n, SCIP_Real *A, SCIP_Real *eigenvalues, SCIP_Real *eigenvectors)
 
SCIP_EXPORT SCIP_RETCODE SCIPlapackMatrixVectorMult (int nrows, int ncols, SCIP_Real *matrix, SCIP_Real *vector, SCIP_Real *result)
 
SCIP_EXPORT 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)
 
SCIP_RETCODE SCIPlapackLinearSolve (BMS_BUFMEM *bufmem, int m, int n, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x)
 

Detailed Description

interface methods for eigenvector computation and matrix multiplication using openblas

Author
Tristan Gally
Marc Pfetsch

Definition in file lapack_interface.h.

Function Documentation

SCIP_EXPORT SCIP_RETCODE SCIPlapackComputeIthEigenvalue ( BMS_BUFMEM *  bufmem,
SCIP_Bool  geteigenvectors,
int  n,
SCIP_Real *  A,
int  i,
SCIP_Real *  eigenvalue,
SCIP_Real *  eigenvector 
)

computes the i-th eigenvalue of a symmetric matrix using LAPACK, where 1 is the smallest and n the largest, matrix has to be given with all \(n^2\) entries

Parameters
bufmembuffer memory
geteigenvectorsShould also the eigenvectors be computed?
nsize of matrix
Amatrix for which eigenvalues should be computed - will be destroyed!
iindex of eigenvalue to be computed
eigenvaluepointer to store eigenvalue
eigenvectorpointer to array to store eigenvector

Definition at line 174 of file lapack_interface.c.

References BMS_CALL, F77_FUNC, and SCIP_RealTOINT.

Referenced by addMultipleSparseCuts(), checkFixedFeasibilitySdp(), checkVarsLocks(), computeAllmatricespsd(), isMatrixRankOne(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIPconsSdpCheckSdpCons(), SCIPoneVarFeasible(), SCIPsdpSolcheckerCheck(), SCIPsdpSolcheckerCheckAndGetViolDual(), SCIPsdpSolcheckerCheckAndGetViolPrimal(), separateSol(), tightenBounds(), and updateVarLocks().

SCIP_EXPORT SCIP_RETCODE SCIPlapackComputeIthEigenvalueAlternative ( BMS_BUFMEM *  bufmem,
SCIP_Bool  geteigenvectors,
int  n,
SCIP_Real *  A,
int  i,
SCIP_Real *  eigenvalue,
SCIP_Real *  eigenvector 
)

computes i-th eigenvalue of a symmetric matrix using alternative algorithm in LAPACK, where 1 is the smallest and n the largest, matrix has to be given with all \(n^2\) entries

Parameters
bufmembuffer memory
geteigenvectorsShould also the eigenvectors be computed?
nsize of matrix
Amatrix for which eigenvalues should be computed - will be destroyed!
iindex of eigenvalue to be computed
eigenvaluepointer to store eigenvalue
eigenvectorpointer to array to store eigenvector

Definition at line 287 of file lapack_interface.c.

References BMS_CALL, F77_FUNC, and SCIP_RealTOINT.

SCIP_EXPORT SCIP_RETCODE SCIPlapackComputeEigenvectorsNegative ( BMS_BUFMEM *  bufmem,
int  n,
SCIP_Real *  A,
SCIP_Real  tol,
int *  neigenvalues,
SCIP_Real *  eigenvalues,
SCIP_Real *  eigenvectors 
)

computes eigenvectors corresponding to negative eigenvalues of a symmetric matrix using LAPACK, matrix has to be given with all \(n^2\) entries

Parameters
bufmembuffer memory
nsize of matrix
Amatrix for which eigenvectors should be computed - will be destroyed!
toltolerance; the eigenvalues will be in the interval (-1e20, -tol]
neigenvaluespointer to store the number of negative eigenvalues
eigenvaluesarray for eigenvalues (should be length n)
eigenvectorsarray for eigenvectors (should be length n*n), eigenvectors are given as rows

Definition at line 394 of file lapack_interface.c.

References BMS_CALL, F77_FUNC, and SCIP_RealTOINT.

Referenced by separateSol().

SCIP_EXPORT 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 - will be destroyed!
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 503 of file lapack_interface.c.

References BMS_CALL, F77_FUNC, and SCIP_RealTOINT.

Referenced by calcRelax(), and SCIP_DECL_CONSCHECK().

SCIP_EXPORT 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 603 of file lapack_interface.c.

References F77_FUNC.

Referenced by addMultipleSparseCuts(), separateSol(), sparsifyCut(), and truncatedPowerMethod().

SCIP_EXPORT 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 650 of file lapack_interface.c.

References F77_FUNC.

Referenced by calcRelax(), and SCIP_DECL_CONSCHECK().

SCIP_RETCODE SCIPlapackLinearSolve ( BMS_BUFMEM *  bufmem,
int  m,
int  n,
SCIP_Real *  A,
SCIP_Real *  b,
SCIP_Real *  x 
)

computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using LAPACK (uses singular value decomposition of A). A is an M-by-N matrix which may be rank-deficient.

Parameters
bufmembuffer memory
mnumber of rows of A
nnumber of columns of A
Acoefficient matrix of the linear system
bright-hand side of the linear system (should be length max(m,n))
xpointer to store values for x (should be length n)

Definition at line 708 of file lapack_interface.c.

References BMS_CALL, F77_FUNC, and SCIP_RealTOINT.

Referenced by SCIP_DECL_CONSCHECK().