Cgl 0.60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Coin_C_defines.h
Go to the documentation of this file.
1 /* $Id: Coin_C_defines.h 2089 2019-02-07 19:44:57Z unxusr $ */
2 /*
3 Copyright (C) 2002, 2003 International Business Machines Corporation
4 and others. All Rights Reserved.
5
6 This code is licensed under the terms of the Eclipse Public License (EPL).
7 */
8 #ifndef CoinCDefine_H
9 #define CoinCDefine_H
10
15 #if defined(CLP_EXTERN_C)
16 #define COIN_EXTERN_C
17 #define COIN_NO_SBB
18 #define COIN_NO_CBC
19 #endif
20 #if defined(SBB_EXTERN_C)
21 #define COIN_EXTERN_C
22 #define COIN_NO_CLP
23 #endif
24 #if defined(CBC_EXTERN_C)
25 #define COIN_EXTERN_C
26 #define COIN_NO_CLP
27 #endif
28 /* We need to allow for Microsoft */
29 #ifndef COINLIBAPI
30
31 #if defined(CBCCINTERFACEDLL_EXPORTS) || defined(CLPMSDLL)
32 #if defined(COIN_EXTERN_C)
33 #define COINLIBAPI __declspec(dllexport)
34 #else
35 #define COINLIBAPI __declspec(dllexport)
36 #endif
37 #define COINLINKAGE __stdcall
38 #define COINLINKAGE_CB __cdecl
39 #else
40 #if defined(COIN_EXTERN_C)
41 #define COINLIBAPI extern "C"
42 #else
43 #define COINLIBAPI
44 #endif
45 #define COINLINKAGE
46 #define COINLINKAGE_CB
47 #endif
48
49 #endif
50
51 #if defined(CLP_EXTERN_C)
52 /* Real typedef for structure */
53 class CMessageHandler;
54 typedef struct {
55 ClpSimplex *model_;
56 CMessageHandler *handler_;
57 } Clp_Simplex;
58 #else
59 typedef void Clp_Simplex;
60 #endif
61
62 #ifndef COIN_NO_CLP
63
65 #if COIN_BIG_INDEX == 0
66 typedef void(COINLINKAGE_CB *clp_callback)(Clp_Simplex *model, int msgno, int ndouble,
67 const double *dvec, int nint, const int *ivec,
68 int nchar, char **cvec);
69 #elif COIN_BIG_INDEX == 1
70 typedef void(COINLINKAGE_CB *clp_callback)(Clp_Simplex *model, int msgno, int ndouble,
71 const double *dvec, int nint, const long *ivec,
72 int nchar, char **cvec);
73 #else
74 typedef void(COINLINKAGE_CB *clp_callback)(Clp_Simplex *model, int msgno, int ndouble,
75 const double *dvec, int nint, const long long *ivec,
76 int nchar, char **cvec);
77 #endif
78 #endif
79
80 #if defined(SBB_EXTERN_C)
81 /* Real typedef for structure */
82 class Sbb_MessageHandler;
83 typedef struct {
84 OsiClpSolverInterface *solver_;
85 SbbModel *model_;
86 Sbb_MessageHandler *handler_;
87 char *information_;
88 } Sbb_Model;
89 #else
90 typedef void Sbb_Model;
91 #endif
92 #if defined(CBC_EXTERN_C)
93 /* Real typedef for structure */
94 class Cbc_MessageHandler;
95 typedef struct {
96 OsiClpSolverInterface *solver_;
97 CbcModel *model_;
98 CbcSolverUsefulData *cbcData;
99 Cbc_MessageHandler *handler_;
100 std::vector< std::string > cmdargs_;
101 char relax_;
102
103 // cache for columns
104 int colSpace;
105 int nCols;
106 int cNameSpace;
107 int *cNameStart;
108 char *cInt;
109 char *cNames;
110 double *cLB;
111 double *cUB;
112 double *cObj;
113 } Cbc_Model;
114 #else
115 typedef void Cbc_Model;
116 #endif
117 #ifndef COIN_NO_SBB
118
120 typedef void(COINLINKAGE_CB *sbb_callback)(Sbb_Model *model, int msgno, int ndouble,
121 const double *dvec, int nint, const int *ivec,
122 int nchar, char **cvec);
123
124 typedef void(COINLINKAGE_CB *cbc_callback)(Cbc_Model *model, int msgno, int ndouble,
125 const double *dvec, int nint, const int *ivec,
126 int nchar, char **cvec);
127
133 typedef void(COINLINKAGE_CB *cbc_cut_callback)(void *osiSolver, void *osiCuts, void *appdata);
134 #endif
135 #if COIN_BIG_INDEX == 0
136 typedef int CoinBigIndex;
137 #elif COIN_BIG_INDEX == 1
138 typedef long CoinBigIndex;
139 #else
140 typedef long long CoinBigIndex;
141 #endif
142 /* just in case used somewhere */
143 #undef COIN_NO_CLP
144 #undef COIN_NO_SBB
145 #undef COIN_NO_CBC
146 #endif
147
148 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
149 */
Clp_Simplex
void Clp_Simplex
User does not need to see structure of model but C++ code does.
Definition: Coin_C_defines.h:59
sbb_callback
void(COINLINKAGE_CB * sbb_callback)(Sbb_Model *model, int msgno, int ndouble, const double *dvec, int nint, const int *ivec, int nchar, char **cvec)
typedef for user call back.
Definition: Coin_C_defines.h:120
cbc_cut_callback
void(COINLINKAGE_CB * cbc_cut_callback)(void *osiSolver, void *osiCuts, void *appdata)
typedef for cbc cut callback osiSolver needs to be an OsiSolverInterface object, osiCuts is an OsiCut...
Definition: Coin_C_defines.h:133
OsiClpSolverInterface
Clp Solver Interface.
Definition: OsiClpSolverInterface.hpp:37
cbc_callback
void(COINLINKAGE_CB * cbc_callback)(Cbc_Model *model, int msgno, int ndouble, const double *dvec, int nint, const int *ivec, int nchar, char **cvec)
Definition: Coin_C_defines.h:124
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:106
clp_callback
void(COINLINKAGE_CB * clp_callback)(Clp_Simplex *model, int msgno, int ndouble, const double *dvec, int nint, const int *ivec, int nchar, char **cvec)
typedef for user call back.
Definition: Coin_C_defines.h:66
Sbb_Model
void Sbb_Model
User does not need to see structure of model but C++ code does.
Definition: Coin_C_defines.h:90
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:136
Cbc_Model
void Cbc_Model
Definition: Coin_C_defines.h:115
COINLINKAGE_CB
#define COINLINKAGE_CB
Definition: Coin_C_defines.h:46