Scippy

    SCIP

    Solving Constraint Integer Programs

    datatree.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 datatree.h
    26 * @ingroup INTERNALAPI
    27 * @brief internal methods for handling data trees
    28 * @author Mohammed Ghannam
    29 */
    30
    31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    32
    33#ifndef __SCIP_DATATREE_H__
    34#define __SCIP_DATATREE_H__
    35
    36#include <stdio.h>
    37
    38#include "scip/def.h"
    40#include "scip/type_retcode.h"
    41#include "scip/type_set.h"
    42#include "scip/type_datatree.h"
    43#include "scip/type_paramset.h"
    44#include "scip/type_message.h"
    45#include "scip/type_mem.h"
    46
    47#ifdef __cplusplus
    48extern "C" {
    49#endif
    50
    51/** creates a new SCIP_DATATREE with a given capacity for items */
    53 SCIP_DATATREE** datatree, /**< buffer to store pointer to created data tree */
    54 BMS_BLKMEM* blkmem, /**< block memory */
    55 int capacity /**< initial capacity */
    56 );
    57
    58/** frees a SCIP_DATATREE object */
    60 SCIP_DATATREE** datatree, /**< pointer to datatree to free */
    61 BMS_BLKMEM* blkmem /**< block memory */
    62 );
    63
    64/** inserts a SCIP_Bool value into a SCIP_DATATREE object */
    66 SCIP_DATATREE* datatree, /**< data tree */
    67 SCIP_SET* set, /**< global SCIP settings */
    68 BMS_BLKMEM* blkmem, /**< block memory */
    69 const char* name, /**< name of entry */
    70 SCIP_Bool value /**< value of entry */
    71 );
    72
    73/** inserts a long value into a SCIP_DATATREE object */
    75 SCIP_DATATREE* datatree, /**< data tree */
    76 SCIP_SET* set, /**< global SCIP settings */
    77 BMS_BLKMEM* blkmem, /**< block memory */
    78 const char* name, /**< name of entry */
    79 SCIP_Longint value /**< value of entry */
    80 );
    81
    82/** inserts a SCIP_Real value into a SCIP_DATATREE object */
    84 SCIP_DATATREE* datatree, /**< data tree */
    85 SCIP_SET* set, /**< global SCIP settings */
    86 BMS_BLKMEM* blkmem, /**< block memory */
    87 const char* name, /**< name of entry */
    88 SCIP_Real value /**< value of entry */
    89 );
    90
    91/** inserts a string value into a SCIP_DATATREE object */
    93 SCIP_DATATREE* datatree, /**< data tree */
    94 SCIP_SET* set, /**< global SCIP settings */
    95 BMS_BLKMEM* blkmem, /**< block memory */
    96 const char* name, /**< name of entry */
    97 const char* value /**< value of entry */
    98 );
    99
    100/** inserts a SCIP_Bool array into a SCIP_DATATREE object */
    102 SCIP_DATATREE* datatree, /**< data tree */
    103 SCIP_SET* set, /**< global SCIP settings */
    104 BMS_BLKMEM* blkmem, /**< block memory */
    105 const char* name, /**< name of entry */
    106 const SCIP_Bool* values, /**< values of entry */
    107 int nvalues /**< number of values */
    108 );
    109
    110/** inserts a SCIP_Real array into a SCIP_DATATREE object */
    112 SCIP_DATATREE* datatree, /**< data tree */
    113 SCIP_SET* set, /**< global SCIP settings */
    114 BMS_BLKMEM* blkmem, /**< block memory */
    115 const char* name, /**< name of entry */
    116 const SCIP_Real* values, /**< values of entry */
    117 int nvalues /**< number of values */
    118 );
    119
    120/** inserts a SCIP_Longint array into a SCIP_DATATREE object */
    122 SCIP_DATATREE* datatree, /**< data tree */
    123 SCIP_SET* set, /**< global SCIP settings */
    124 BMS_BLKMEM* blkmem, /**< block memory */
    125 const char* name, /**< name of entry */
    126 const SCIP_Longint* values, /**< values of entry */
    127 int nvalues /**< number of values */
    128 );
    129
    130/** inserts a string array into a SCIP_DATATREE object */
    132 SCIP_DATATREE* datatree, /**< data tree */
    133 SCIP_SET* set, /**< global SCIP settings */
    134 BMS_BLKMEM* blkmem, /**< block memory */
    135 const char* name, /**< name of entry */
    136 const char* const* values, /**< values of entry */
    137 int nvalues /**< number of values */
    138 );
    139
    140/** inserts a store value into a SCIP_DATATREE object */
    142 SCIP_DATATREE* datatree, /**< data tree*/
    143 SCIP_SET* set, /**< global SCIP settings */
    144 BMS_BLKMEM* blkmem, /**< block memory */
    145 const char* name, /**< name of entry */
    146 SCIP_DATATREE* value /**< value of entry */
    147 );
    148
    149/** writes a SCIP_DATATREE object as JSON to file */
    151 SCIP_DATATREE* datatree, /**< data tree */
    152 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
    153 FILE* file /**< file to write to, or NULL for stdout */
    154 );
    155
    156#ifdef __cplusplus
    157}
    158#endif
    159
    160#endif
    SCIP_RETCODE SCIPdatatreeInsertBoolArray(SCIP_DATATREE *datatree, SCIP_SET *set, BMS_BLKMEM *blkmem, const char *name, const SCIP_Bool *values, int nvalues)
    Definition: datatree.c:316
    SCIP_RETCODE SCIPdatatreeInsertTree(SCIP_DATATREE *datatree, SCIP_SET *set, BMS_BLKMEM *blkmem, const char *name, SCIP_DATATREE *value)
    Definition: datatree.c:461
    SCIP_RETCODE SCIPdatatreeInsertStringArray(SCIP_DATATREE *datatree, SCIP_SET *set, BMS_BLKMEM *blkmem, const char *name, const char *const *values, int nvalues)
    Definition: datatree.c:421
    SCIP_RETCODE SCIPdatatreeInsertLongArray(SCIP_DATATREE *datatree, SCIP_SET *set, BMS_BLKMEM *blkmem, const char *name, const SCIP_Longint *values, int nvalues)
    Definition: datatree.c:351
    SCIP_RETCODE SCIPdatatreeCreate(SCIP_DATATREE **datatree, BMS_BLKMEM *blkmem, int capacity)
    Definition: datatree.c:112
    void SCIPdatatreeFree(SCIP_DATATREE **datatree, BMS_BLKMEM *blkmem)
    Definition: datatree.c:135
    SCIP_RETCODE SCIPdatatreeInsertLong(SCIP_DATATREE *datatree, SCIP_SET *set, BMS_BLKMEM *blkmem, const char *name, SCIP_Longint value)
    Definition: datatree.c:223
    SCIP_RETCODE SCIPdatatreeWriteJson(SCIP_DATATREE *datatree, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
    Definition: datatree.c:492
    SCIP_RETCODE SCIPdatatreeInsertString(SCIP_DATATREE *datatree, SCIP_SET *set, BMS_BLKMEM *blkmem, const char *name, const char *value)
    Definition: datatree.c:285
    SCIP_RETCODE SCIPdatatreeInsertRealArray(SCIP_DATATREE *datatree, SCIP_SET *set, BMS_BLKMEM *blkmem, const char *name, const SCIP_Real *values, int nvalues)
    Definition: datatree.c:386
    SCIP_RETCODE SCIPdatatreeInsertBool(SCIP_DATATREE *datatree, SCIP_SET *set, BMS_BLKMEM *blkmem, const char *name, SCIP_Bool value)
    Definition: datatree.c:192
    SCIP_RETCODE SCIPdatatreeInsertReal(SCIP_DATATREE *datatree, SCIP_SET *set, BMS_BLKMEM *blkmem, const char *name, SCIP_Real value)
    Definition: datatree.c:254
    common defines and data types used in all packages of SCIP
    #define SCIP_Longint
    Definition: def.h:141
    #define SCIP_Bool
    Definition: def.h:91
    #define SCIP_Real
    Definition: def.h:156
    memory allocation routines
    struct BMS_BlkMem BMS_BLKMEM
    Definition: memory.h:437
    Definition: heur_padm.c:135
    type definitions for data tree
    type definitions for block memory pools and memory buffers
    type definitions for message output methods
    type definitions for handling parameter settings
    type definitions for return codes for SCIP methods
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    type definitions for global SCIP settings