Scippy

    SCIP

    Solving Constraint Integer Programs

    scip_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 scip_datatree.h
    26 * @ingroup PUBLICCOREAPI
    27 * @brief public methods for data tree structure
    28 * @author Mohammed Ghannam
    29 */
    30
    31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    32
    33#ifndef __SCIP_SCIP_DATATREE_H__
    34#define __SCIP_SCIP_DATATREE_H__
    35
    36
    37#include "scip/def.h"
    38#include "scip/type_retcode.h"
    39#include "scip/type_scip.h"
    40#include "scip/type_set.h"
    41#include "scip/type_table.h"
    42#include "scip/type_datatree.h"
    43
    44#ifdef __cplusplus
    45extern "C" {
    46#endif
    47
    48/**@addtogroup PublicDatatreeMethods
    49 *
    50 * @{
    51 */
    52
    53/** creates a new SCIP_DATATREE */
    54SCIP_EXPORT
    56 SCIP* scip, /**< SCIP data structure */
    57 SCIP_DATATREE** datatree, /**< buffer to store created data tree */
    58 int capacity /**< desired capacity, or -1 for default */
    59 );
    60
    61/** creates a new SCIP_DATATREE and inserts it into a SCIP_DATATREE object */
    62SCIP_EXPORT
    64 SCIP* scip, /**< SCIP data structure */
    65 SCIP_DATATREE* datatree, /**< data tree where to insert new data tree */
    66 SCIP_DATATREE** newtree, /**< buffer to store pointer to created store */
    67 const char* name, /**< name of entry to add */
    68 int capacity /**< capacity of new store, or -1 for default */
    69 );
    70
    71/** inserts a bool value into a SCIP_DATATREE object */
    72SCIP_EXPORT
    74 SCIP* scip, /**< SCIP data structure */
    75 SCIP_DATATREE* datatree, /**< data tree */
    76 const char* name, /**< name of entry to add */
    77 SCIP_Bool value /**< value to add */
    78 );
    79
    80/** inserts an int value into a SCIP_DATATREE object
    81 *
    82 * The value will be stored as SCIP_Longint.
    83 */
    84SCIP_EXPORT
    86 SCIP* scip, /**< SCIP data structure */
    87 SCIP_DATATREE* datatree, /**< data tree */
    88 const char* name, /**< name of entry to add */
    89 int value /**< value to add */
    90 );
    91
    92/** inserts a long value into a SCIP_DATATREE object */
    93SCIP_EXPORT
    95 SCIP* scip, /**< SCIP data structure */
    96 SCIP_DATATREE* datatree, /**< data tree */
    97 const char* name, /**< name of entry to add */
    98 SCIP_Longint value /**< value to add */
    99 );
    100
    101/** inserts a SCIP_Real value into a SCIP_DATATREE object */
    102SCIP_EXPORT
    104 SCIP* scip, /**< SCIP data structure */
    105 SCIP_DATATREE* datatree, /**< data tree */
    106 const char* name, /**< name of entry to add */
    107 SCIP_Real value /**< value to add */
    108 );
    109
    110/** inserts a string value into a SCIP_DATATREE object
    111 *
    112 * The string value will be copied.
    113 */
    114SCIP_EXPORT
    116 SCIP* scip, /**< SCIP data structure */
    117 SCIP_DATATREE* datatree, /**< data tree */
    118 const char* name, /**< name of entry to add */
    119 const char* value /**< value to add */
    120 );
    121
    122/** inserts a SCIP_Bool array into a SCIP_DATATREE object */
    123SCIP_EXPORT
    125 SCIP* scip, /**< SCIP data structure */
    126 SCIP_DATATREE* datatree, /**< data tree */
    127 const char* name, /**< name of entry to add */
    128 const SCIP_Bool* values, /**< values of entry */
    129 int nvalues /**< number of values */
    130 );
    131
    132/** inserts an int array into a SCIP_DATATREE object
    133 *
    134 * The value will be stored as array of SCIP_Longint.
    135 */
    136SCIP_EXPORT
    138 SCIP* scip, /**< SCIP data structure */
    139 SCIP_DATATREE* datatree, /**< data tree */
    140 const char* name, /**< name of entry to add */
    141 const int* values, /**< values of entry */
    142 int nvalues /**< number of values */
    143 );
    144
    145/** inserts a SCIP_Longint array into a SCIP_DATATREE object */
    146SCIP_EXPORT
    148 SCIP* scip, /**< SCIP data structure */
    149 SCIP_DATATREE* datatree, /**< data tree */
    150 const char* name, /**< name of entry to add */
    151 const SCIP_Longint* values, /**< values of entry */
    152 int nvalues /**< number of values */
    153 );
    154
    155/** inserts a SCIP_Real array into a SCIP_DATATREE object */
    156SCIP_EXPORT
    158 SCIP* scip, /**< SCIP data structure */
    159 SCIP_DATATREE* datatree, /**< data tree */
    160 const char* name, /**< name of entry to add */
    161 const SCIP_Real* values, /**< values of entry */
    162 int nvalues /**< number of values */
    163 );
    164
    165/** inserts a string array into a SCIP_DATATREE object */
    166SCIP_EXPORT
    168 SCIP* scip, /**< SCIP data structure */
    169 SCIP_DATATREE* datatree, /**< data tree */
    170 const char* name, /**< name of entry to add */
    171 const char* const* values, /**< values of entry */
    172 int nvalues /**< number of values */
    173 );
    174
    175/** inserts a data tree value into a SCIP_DATATREE object
    176 *
    177 * The data tree assumes ownership of value.
    178 */
    179SCIP_EXPORT
    181 SCIP* scip, /**< SCIP data structure */
    182 SCIP_DATATREE* datatree, /**< data tree */
    183 const char* name, /**< name of entry to add */
    184 SCIP_DATATREE* value /**< value to add */
    185 );
    186
    187/** frees a SCIP_DATATREE object */
    188SCIP_EXPORT
    190 SCIP* scip, /**< SCIP data structure */
    191 SCIP_DATATREE** datatree /**< pointer to data tree to free */
    192 );
    193
    194/** writes a SCIP_DATATREE object as JSON to a file */
    195SCIP_EXPORT
    197 SCIP* scip, /**< SCIP data structure */
    198 FILE* file, /**< file to write to, or NULL for stdout */
    199 SCIP_DATATREE* datatree /**< data tree to write */
    200 );
    201
    202/** prints a generic table from a data store */
    203SCIP_EXPORT
    205 SCIP* scip, /**< SCIP data structure */
    206 SCIP_DATATREE* datatree, /**< data tree */
    207 FILE* file, /**< output file */
    208 const char* sectionname, /**< section name to process, e.g., "plugins" */
    209 const char* tablename /**< table name to process, e.g., "heuristics" */
    210 );
    211
    212/** @} */
    213
    214#ifdef __cplusplus
    215}
    216#endif
    217
    218#endif
    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
    SCIP_RETCODE SCIPinsertDatatreeStringArray(SCIP *scip, SCIP_DATATREE *datatree, const char *name, const char *const *values, int nvalues)
    SCIP_RETCODE SCIPprintDatatreeAsTable(SCIP *scip, SCIP_DATATREE *datatree, FILE *file, const char *sectionname, const char *tablename)
    SCIP_RETCODE SCIPinsertDatatreeLongArray(SCIP *scip, SCIP_DATATREE *datatree, const char *name, const SCIP_Longint *values, int nvalues)
    SCIP_RETCODE SCIPinsertDatatreeRealArray(SCIP *scip, SCIP_DATATREE *datatree, const char *name, const SCIP_Real *values, int nvalues)
    SCIP_RETCODE SCIPinsertDatatreeBoolArray(SCIP *scip, SCIP_DATATREE *datatree, const char *name, const SCIP_Bool *values, int nvalues)
    void SCIPfreeDatatree(SCIP *scip, SCIP_DATATREE **datatree)
    SCIP_RETCODE SCIPinsertDatatreeTree(SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_DATATREE *value)
    SCIP_RETCODE SCIPcreateDatatreeInTree(SCIP *scip, SCIP_DATATREE *datatree, SCIP_DATATREE **newtree, const char *name, int capacity)
    Definition: scip_datatree.c:61
    SCIP_RETCODE SCIPinsertDatatreeString(SCIP *scip, SCIP_DATATREE *datatree, const char *name, const char *value)
    SCIP_RETCODE SCIPinsertDatatreeBool(SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Bool value)
    Definition: scip_datatree.c:82
    SCIP_RETCODE SCIPcreateDatatree(SCIP *scip, SCIP_DATATREE **datatree, int capacity)
    Definition: scip_datatree.c:46
    SCIP_RETCODE SCIPinsertDatatreeInt(SCIP *scip, SCIP_DATATREE *datatree, const char *name, int value)
    SCIP_RETCODE SCIPinsertDatatreeIntArray(SCIP *scip, SCIP_DATATREE *datatree, const char *name, const int *values, int nvalues)
    SCIP_RETCODE SCIPinsertDatatreeLong(SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Longint value)
    SCIP_RETCODE SCIPwriteDatatreeJson(SCIP *scip, FILE *file, SCIP_DATATREE *datatree)
    SCIP_RETCODE SCIPinsertDatatreeReal(SCIP *scip, SCIP_DATATREE *datatree, const char *name, SCIP_Real value)
    type definitions for data tree
    type definitions for return codes for SCIP methods
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63
    type definitions for SCIP's main datastructure
    type definitions for global SCIP settings
    type definitions for displaying statistics tables