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-2014 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file type_misc.h
17  * @ingroup TYPEDEFINITIONS
18  * @brief type definitions for miscellaneous datastructures
19  * @author Tobias Achterberg
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_TYPE_MISC_H__
25 #define __SCIP_TYPE_MISC_H__
26 
27 #include "scip/def.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /** Sparse solution data structure
34  *
35  * - \ref SparseSol "List of all available methods"
36  */
37 typedef struct SCIP_SparseSol SCIP_SPARSESOL;
38 
39 /** (circular) Queue data structure
40  *
41  * - \ref Queue "List of all available methods"
42  */
43 typedef struct SCIP_Queue SCIP_QUEUE;
44 
45 /** Priority queue data structure
46  *
47  * - \ref PriorityQueue "List of all available methods"
48  */
49 typedef struct SCIP_PQueue SCIP_PQUEUE;
50 
51 /** Hash table data structure
52  *
53  * - \ref HashTable "List of all available methods"
54  */
55 typedef struct SCIP_HashTable SCIP_HASHTABLE;
56 
57 /** Hash table element list to store single elements of a hash table */
58 typedef struct SCIP_HashTableList SCIP_HASHTABLELIST;
59 
60 /** Hash map data structure
61  *
62  * - \ref HashMap "List of all available methods"
63  */
64 typedef struct SCIP_HashMap SCIP_HASHMAP;
65 
66 /** Hash map element list to store single mappings of a hash map */
67 typedef struct SCIP_HashMapList SCIP_HASHMAPLIST;
68 
69 /** dynamic array for storing SCIP_Real values */
70 typedef struct SCIP_RealArray SCIP_REALARRAY;
71 
72 /** dynamic array for storing int values */
73 typedef struct SCIP_IntArray SCIP_INTARRAY;
74 
75 /** dynamic array for storing SCIP_Bool values */
76 typedef struct SCIP_BoolArray SCIP_BOOLARRAY;
77 
78 /** dynamic array for storing pointers */
79 typedef struct SCIP_PtrArray SCIP_PTRARRAY;
80 
81 /** Resource activity data structure
82  *
83  * - \ref ResourceActivity "List of all available methods"
84  */
85 typedef struct SCIP_ResourceActivity SCIP_RESOURCEACTIVITY;
86 
87 /** Resource profile data structure
88  *
89  * - \ref ResourceProfile "List of all available methods"
90  */
91 typedef struct SCIP_Profile SCIP_PROFILE;
92 
93 /** Directed graph data structure (stored as adjacency list)
94  *
95  * - \ref DirectedGraph "List of all available methods"
96  */
97 typedef struct SCIP_Digraph SCIP_DIGRAPH;
98 
99 /** Binary tree data structure
100  *
101  * - \ref BinaryTree "List of all available methods"
102  */
103 typedef struct SCIP_Bt SCIP_BT;
104 
105 /** search node of \ref SCIP_BT "binary tree" */
106 typedef struct SCIP_BtNode SCIP_BTNODE;
107 
108 /** compares two element indices
109  * result:
110  * < 0: ind1 comes before (is better than) ind2
111  * = 0: both indices have the same value
112  * > 0: ind2 comes after (is worse than) ind2
113  */
114 #define SCIP_DECL_SORTINDCOMP(x) int x (void* dataptr, int ind1, int ind2)
115 
116 /** compares two data element pointers
117  * result:
118  * < 0: elem1 comes before (is better than) elem2
119  * = 0: both elements have the same value
120  * > 0: elem2 comes after (is worse than) elem2
121  */
122 #define SCIP_DECL_SORTPTRCOMP(x) int x (void* elem1, void* elem2)
123 
124 /** gets the key of the given element */
125 #define SCIP_DECL_HASHGETKEY(x) void* x (void* userptr, void* elem)
126 
127 /** returns TRUE iff both keys are equal */
128 #define SCIP_DECL_HASHKEYEQ(x) SCIP_Bool x (void* userptr, void* key1, void* key2)
129 
130 /** returns the hash value of the key */
131 #define SCIP_DECL_HASHKEYVAL(x) unsigned int x (void* userptr, void* key)
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif
138