Scippy

SCIP

Solving Constraint Integer Programs

struct_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 struct_datatree.h
26 * @ingroup INTERNALAPI
27 * @brief data structures for 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_STRUCT_DATATREE_H__
34#define __SCIP_STRUCT_DATATREE_H__
35
36#include "scip/def.h"
37#include "scip/type_set.h"
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/** union to store any possible value of a SCIP_DATATREE */
44typedef union
45{
46 SCIP_Bool as_bool; /**< value interpreted as a boolean */
47 SCIP_Longint as_long; /**< value interpreted as a long integer */
48 SCIP_Real as_real; /**< value interpreted as a SCIP_Real */
49 char* as_string; /**< value interpreted as a string */
50 SCIP_Bool* as_boolarray; /**< value interpreted as an array of boolean */
51 SCIP_Longint* as_longarray; /**< value interpreted as an array of long integer */
52 SCIP_Real* as_realarray; /**< value interpreted as an array of SCIP_Real */
53 char** as_stringarray; /**< value interpreted as an array of string */
54 SCIP_DATATREE* as_dtree; /**< value interpreted as a SCIP_DATATREE */
56
57/** structure representing a value in a SCIP_DATATREE */
58typedef struct
59{
60 SCIP_DATATREE_VALUETYPE type; /**< type of the value */
61 SCIP_DATATREEVALUEUNION data; /**< storage for the value (as union) */
62 int nvalues; /**< length of arrays if array type */
64
65/** structure representing an item in a SCIP_DATATREE */
66typedef struct
67{
68 char* name; /**< name of data item */
69 SCIP_DATATREEVALUE value; /**< value of data item */
71
72/** structure representing a node in a tree of data */
74{
75 SCIP_DATATREEITEM* items; /**< array of data items */
76 int nitems; /**< number of items currently stored */
77 int itemssize; /**< capacity (size) of the data tree (maximum number of items it can hold) */
78};
79
80#ifdef __cplusplus
81}
82#endif
83
84#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_DATATREEVALUE value
SCIP_DATATREEVALUEUNION data
SCIP_DATATREE_VALUETYPE type
SCIP_DATATREEITEM * items
enum SCIP_Datatree_Valuetype SCIP_DATATREE_VALUETYPE
Definition: type_datatree.h:55
type definitions for global SCIP settings
SCIP_DATATREE * as_dtree
SCIP_Longint * as_longarray