Scippy

SCIP

Solving Constraint Integer Programs

type_misc.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 type_misc.h
26 * @ingroup TYPEDEFINITIONS
27 * @brief type definitions for miscellaneous datastructures
28 * @author Tobias Achterberg
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_TYPE_MISC_H__
34#define __SCIP_TYPE_MISC_H__
35
36#include "scip/def.h"
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/** represents different confidence levels for (one-sided) hypothesis testing; in order to obtain two-sided confidence
43 * levels, calculate 2 * c - 1, i.e., if the one-sided confidence level is 90 %, the two-sided level is 80 %
44 */
46{
47 SCIP_CONFIDENCELEVEL_MIN = 0, /**< one-sided confidence level 75 %, two-sided 50 % */
48 SCIP_CONFIDENCELEVEL_LOW = 1, /**< (one-sided) confidence level 87.5 %, two-sided 75 % */
49 SCIP_CONFIDENCELEVEL_MEDIUM = 2, /**< (one-sided) confidence level 90 %, two-sided 80 % */
50 SCIP_CONFIDENCELEVEL_HIGH = 3, /**< (one-sided) confidence level 95 %, two-sided 90 % */
51 SCIP_CONFIDENCELEVEL_MAX = 4 /**< (one-sided) confidence level 97.5 %, two-sided 95 % */
52};
54
55/** type of hashmap: are pointers, reals or ints stored, or unknown */
57{
58 SCIP_HASHMAPTYPE_UNKNOWN = 0, /**< the hashmap did not store a single element yet, type unknown */
59 SCIP_HASHMAPTYPE_POINTER = 1, /**< the hashmap stores pointers % */
60 SCIP_HASHMAPTYPE_REAL = 2, /**< the hashmap stores reals */
61 SCIP_HASHMAPTYPE_INT = 3, /**< the hashmap stores ints */
62 SCIP_HASHMAPTYPE_LONG = 4 /**< the hashmap stores long ints */
63};
65
66/** Sparse solution data structure
67 *
68 * - \ref SparseSol "List of all available methods"
69 */
71
72/** (circular) Queue data structure
73 *
74 * - \ref Queue "List of all available methods"
75 */
76typedef struct SCIP_Queue SCIP_QUEUE;
77
78/** Priority queue data structure
79 *
80 * - \ref PriorityQueue "List of all available methods"
81 */
82typedef struct SCIP_PQueue SCIP_PQUEUE;
83
84/** Hash table data structure
85 *
86 * - \ref HashTable "List of all available methods"
87 */
89
90/** Hash table data structure which allows multiple occurences of an element
91 *
92 * - \ref MultiHash "List of all available methods"
93 */
95
96/** Hash table element list to store single elements of a multi hash table */
98
99/** Hash map entry */
101
102/** Hash map data structure
103 *
104 * - \ref HashMap "List of all available methods"
105 */
107
108/** Hash set data structure
109 *
110 * - \ref HashSet "List of all available methods"
111 */
113
114/** dynamic array for storing SCIP_Real values */
116
117/** dynamic array for storing int values */
119
120/** dynamic array for storing SCIP_Bool values */
122
123/** dynamic array for storing pointers */
125
126/** random number generator */
128
129/** Resource activity data structure
130 *
131 * - \ref ResourceActivity "List of all available methods"
132 */
134
135/** Resource profile data structure
136 *
137 * - \ref ResourceProfile "List of all available methods"
138 */
140
141/** Directed graph data structure (stored as adjacency list)
142 *
143 * - \ref DirectedGraph "List of all available methods"
144 */
146
147/** Binary tree data structure
148 *
149 * - \ref BinaryTree "List of all available methods"
150 */
151typedef struct SCIP_Bt SCIP_BT;
152
153/** search node of \ref SCIP_BT "binary tree" */
155
156/** regression data structure to compute an incremental linear regression of paired observations
157 *
158 * - \ref Regression "List of all available methods"
159 */
161
162/** disjoint set (disjoint set (union find)) data structure for querying and updating connectedness of a graph with integer vertices 0,...,n - 1
163 *
164 * - \ref DisjointSet "List of available methods"
165 */
167
168/** a linear inequality row in preparation to become a SCIP_ROW
169 *
170 * Used to assemble data that could eventually make a SCIP_ROW.
171 * @note Only one-sided rows are allowed here.
172 */
174
175/** compares two element indices
176 * result:
177 * < 0: ind1 comes before (is better than) ind2
178 * = 0: both indices have the same value
179 * > 0: ind2 comes after (is worse than) ind2
180 */
181#define SCIP_DECL_SORTINDCOMP(x) int x (void* dataptr, int ind1, int ind2)
182
183/** compares two data element pointers
184 * result:
185 * < 0: elem1 comes before (is better than) elem2
186 * = 0: both elements have the same value
187 * > 0: elem2 comes after (is worse than) elem2
188 */
189#define SCIP_DECL_SORTPTRCOMP(x) int x (void* elem1, void* elem2)
190
191/** gets the key of the given element */
192#define SCIP_DECL_HASHGETKEY(x) void* x (void* userptr, void* elem)
193
194/** returns TRUE iff both keys are equal */
195#define SCIP_DECL_HASHKEYEQ(x) SCIP_Bool x (void* userptr, void* key1, void* key2)
196
197/** returns the hash value of the key */
198#define SCIP_DECL_HASHKEYVAL(x) uint64_t x (void* userptr, void* key)
199
200/** evaluates the real function at the given point, used for Newton Procedure
201 * input:
202 * point: the point where the function is evaluated
203 * params: an array of parameters that the function depends on (e.g. f(x) = a*x + b)
204 * nparams: the number of parameters stored in params
205 */
206#define SCIP_DECL_NEWTONEVAL(x) SCIP_Real x (SCIP_Real point, SCIP_Real* params, int nparams)
207
208/** callback to act on position change of @p elem in priority queue */
209#define SCIP_DECL_PQUEUEELEMCHGPOS(x) void x (void* elem, int oldpos, int newpos)
210
211#ifdef __cplusplus
212}
213#endif
214
215#endif
common defines and data types used in all packages of SCIP
SCIP_Hashmaptype
Definition: type_misc.h:57
@ SCIP_HASHMAPTYPE_REAL
Definition: type_misc.h:60
@ SCIP_HASHMAPTYPE_POINTER
Definition: type_misc.h:59
@ SCIP_HASHMAPTYPE_UNKNOWN
Definition: type_misc.h:58
@ SCIP_HASHMAPTYPE_INT
Definition: type_misc.h:61
@ SCIP_HASHMAPTYPE_LONG
Definition: type_misc.h:62
enum SCIP_Hashmaptype SCIP_HASHMAPTYPE
Definition: type_misc.h:64
SCIP_Confidencelevel
Definition: type_misc.h:46
@ SCIP_CONFIDENCELEVEL_MAX
Definition: type_misc.h:51
@ SCIP_CONFIDENCELEVEL_MEDIUM
Definition: type_misc.h:49
@ SCIP_CONFIDENCELEVEL_HIGH
Definition: type_misc.h:50
@ SCIP_CONFIDENCELEVEL_MIN
Definition: type_misc.h:47
@ SCIP_CONFIDENCELEVEL_LOW
Definition: type_misc.h:48
enum SCIP_Confidencelevel SCIP_CONFIDENCELEVEL
Definition: type_misc.h:53