Scippy

    SCIP

    Solving Constraint Integer Programs

    struct_hypergraph.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 struct_hypergraph.h
    26 * @ingroup INTERNALAPI
    27 * @brief datastructures hypergraphs
    28 * @author Matthias Walter
    29 */
    30
    31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    32
    33#ifndef __SCIP_STRUCT_HYPERGRAPH_H__
    34#define __SCIP_STRUCT_HYPERGRAPH_H__
    35
    36#include "scip/def.h"
    37#include "scip/type_misc.h"
    39
    40#ifdef __cplusplus
    41extern "C" {
    42#endif
    43
    44/** a hypergraph with vertices, edges and overlaps of edge pairs */
    46{
    47 BMS_BLKMEM* blkmem; /**< Block memory for storage. */
    48
    49 size_t sizevertexdata; /**< Size (in bytes) of additional vertex data. */
    50 size_t sizeedgedata; /**< Size (in bytes) of additional edge data. */
    51 size_t sizeoverlapdata; /**< Size (in bytes) of additional overlap data. */
    52
    53 int nvertices; /**< Number of vertices. */
    54 int nedges; /**< Number of edges. */
    55 int noverlaps; /**< Number of overlaps. */
    56
    57 int memvertices; /**< Number of vertices for which memory is allocated. */
    58 size_t* verticesdata; /**< Array with vertex data. */
    59 int memedges; /**< Number of edges for which memory is allocated. */
    60
    61 size_t* edgesdata; /**< Array with vertex data. */
    62 int* edgesverticesbeg; /**< Array with indices of edges' incident vertices. */
    63 int memedgesvertices; /**< Number of edges' vertices for which memory is allocated. */
    64 SCIP_HYPERGRAPH_EDGE* edgesvertices; /**< Array with all edges' vertices. */
    65
    66 SCIP_Bool hasvertexedges; /**< Whether there is a mapping from vertices to incident edges. */
    67 int memverticesedgesbeg;/**< Number of vertices for which memory is allocated for vertices' edges. */
    68 int* verticesedgesbeg; /**< Array with indices of vertices' incident edges. */
    69 int memverticesedges; /**< Number of incidences for which memory is allocated. */
    70 SCIP_HYPERGRAPH_VERTEX* verticesedges; /**< Array with all vertices' incident edges. */
    71
    72 SCIP_Bool hasoverlaps; /**< Whether overlap sets are known. */
    73 SCIP_HASHTABLE* overlaphashtable; /**< Hashtable for overlap sets. */
    74 int memoverlaps; /**< Number of overlaps for which memory is allocated. */
    75 int* overlapsverticesbeg;/**< Array with indices of overlaps' vertices. */
    76 int memoverlapsvertices;/**< Number of overlaps' vertices. */
    77 SCIP_HYPERGRAPH_VERTEX* overlapsvertices; /**< Array with all overlaps' vertices. */
    78 size_t* overlapsdata; /**< Array with overlaps' data. */
    79 int memedgesoverlapsbeg;/**< Memory allocated for \p edgesoverlapsbeg minus 1. */
    80 int* edgesoverlapsbeg; /**< Array with indices of edges' incident overlaps. */
    81 int memedgesoverlaps; /**< Number of edges' overlaps for which memory is allocated. */
    82 SCIP_HYPERGRAPH_OVERLAP* edgesoverlaps; /**< Array with edges' incident overlaps. */
    83
    84 SCIP_Bool hasoverlapsedges; /**< Whether overlaps' edges are known. */
    85 int memoverlapsedgesbeg;/**< Memory allocated for \p edgesOverlapsSlice minus 1. */
    86 int* overlapsedgesbeg; /**< Array with indices of overlaps' incident edges. */
    87 int memoverlapsedges; /**< Memory allocated for \p overlapsEdges. */
    88 SCIP_HYPERGRAPH_EDGE* overlapsedges; /**< Array with overlaps' incident edges. */
    89
    90 SCIP_Bool hasverticesoverlaps;/**< Whether vertices' overlaps are known. */
    91 int memverticesoverlapsbeg;/**< Memory allocated for \p verticesOverlapsSlice minus 1. */
    92 int* verticesoverlapsbeg;/**< Array with indices of vertices' incident overlaps. */
    93 int memverticesoverlaps;/**< Memory allocated for \p verticesOverlaps. */
    94 SCIP_HYPERGRAPH_OVERLAP* verticesoverlaps;/**< Array with vertices' incident overlaps. */
    95};
    96
    97#ifdef __cplusplus
    98}
    99#endif
    100
    101#endif
    common defines and data types used in all packages of SCIP
    #define SCIP_Bool
    Definition: def.h:91
    struct BMS_BlkMem BMS_BLKMEM
    Definition: memory.h:437
    SCIP_Bool hasverticesoverlaps
    SCIP_HYPERGRAPH_EDGE * edgesvertices
    SCIP_HYPERGRAPH_OVERLAP * verticesoverlaps
    SCIP_HYPERGRAPH_VERTEX * verticesedges
    SCIP_Bool hasoverlapsedges
    SCIP_HYPERGRAPH_OVERLAP * edgesoverlaps
    BMS_BLKMEM * blkmem
    SCIP_HYPERGRAPH_VERTEX * overlapsvertices
    SCIP_Bool hasvertexedges
    SCIP_HYPERGRAPH_EDGE * overlapsedges
    SCIP_HASHTABLE * overlaphashtable
    type definitions for hypergraphs
    int SCIP_HYPERGRAPH_EDGE
    int SCIP_HYPERGRAPH_OVERLAP
    int SCIP_HYPERGRAPH_VERTEX
    type definitions for miscellaneous datastructures