Scippy

    SCIP

    Solving Constraint Integer Programs

    lapack_calls.h
    Go to the documentation of this file.
    1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    2/* */
    3/* This file is part of the program and library */
    4/* SCIP --- Solving Constraint Integer Programs */
    5/* */
    6/* Copyright (c) 2002-2025 Zuse Institute Berlin (ZIB) */
    7/* */
    8/* Licensed under the Apache License, Version 2.0 (the "License"); */
    9/* you may not use this file except in compliance with the License. */
    10/* You may obtain a copy of the License at */
    11/* */
    12/* http://www.apache.org/licenses/LICENSE-2.0 */
    13/* */
    14/* Unless required by applicable law or agreed to in writing, software */
    15/* distributed under the License is distributed on an "AS IS" BASIS, */
    16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
    17/* See the License for the specific language governing permissions and */
    18/* limitations under the License. */
    19/* */
    20/* You should have received a copy of the Apache-2.0 license */
    21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
    22/* */
    23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    24
    25/**@file lapack_calls.h
    26 * @brief interface methods for lapack functions
    27 * @author Marc Pfetsch
    28 */
    29
    30/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    31
    32#ifndef __SCIP_LAPACK_CALLS_H__
    33#define __SCIP_LAPACK_CALLS_H__
    34
    35#include "scip/def.h"
    37#include "scip/type_retcode.h"
    38
    39#ifdef __cplusplus
    40extern "C" {
    41#endif
    42
    43/** returns whether Lapack is available, i.e., whether it has been linked in */
    44SCIP_EXPORT
    46
    47/** returns Lapack version if Lapack is available */
    48SCIP_EXPORT
    50 int* majorver, /**< major version number */
    51 int* minorver, /**< minor version number */
    52 int* patchver /**< patch version number */
    53 );
    54
    55/** computes eigenvalues and eigenvectors of a dense symmetric matrix
    56 *
    57 * Calls Lapack's DSYEV function.
    58 */
    59SCIP_EXPORT
    61 BMS_BUFMEM* bufmem, /**< buffer memory (or NULL if IPOPT is used) */
    62 SCIP_Bool geteigenvectors, /**< should also eigenvectors should be computed? */
    63 int N, /**< dimension */
    64 SCIP_Real* a, /**< matrix data on input (size N*N); eigenvectors on output if geteigenvectors == TRUE */
    65 SCIP_Real* w /**< array to store eigenvalues (size N) (or NULL) */
    66 );
    67
    68/** solves a linear problem of the form Ax = b for a regular matrix A
    69 *
    70 * Calls Lapack's DGETRF routine to calculate a LU factorization and uses this factorization to solve
    71 * the linear problem Ax = b.
    72 */
    73SCIP_EXPORT
    75 BMS_BUFMEM* bufmem, /**< buffer memory (or NULL if IPOPT is used) */
    76 int n, /**< dimension */
    77 SCIP_Real* A, /**< matrix data on input (size N*N); filled column-wise */
    78 SCIP_Real* b, /**< right hand side vector (size N) */
    79 SCIP_Real* x, /**< buffer to store solution (size N) */
    80 SCIP_Bool* success /**< pointer to store if the solving routine was successful */
    81 );
    82
    83#ifdef __cplusplus
    84}
    85#endif
    86
    87#endif
    SCIP_VAR * w
    Definition: circlepacking.c:67
    SCIP_VAR * a
    Definition: circlepacking.c:66
    SCIP_VAR ** b
    Definition: circlepacking.c:65
    SCIP_VAR ** x
    Definition: circlepacking.c:63
    common defines and data types used in all packages of SCIP
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_Real
    Definition: def.h:156
    SCIP_Bool SCIPlapackIsAvailable(void)
    Definition: lapack_calls.c:121
    SCIP_RETCODE SCIPlapackComputeEigenvalues(BMS_BUFMEM *bufmem, SCIP_Bool geteigenvectors, int N, SCIP_Real *a, SCIP_Real *w)
    Definition: lapack_calls.c:352
    SCIP_RETCODE SCIPlapackSolveLinearEquations(BMS_BUFMEM *bufmem, int n, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
    Definition: lapack_calls.c:386
    void SCIPlapackVersion(int *majorver, int *minorver, int *patchver)
    Definition: lapack_calls.c:181
    memory allocation routines
    type definitions for return codes for SCIP methods
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63