File tree Expand file tree Collapse file tree 7 files changed +1046
-0
lines changed Expand file tree Collapse file tree 7 files changed +1046
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ Interface changes
162
162
- added SCIPsortDownIntIntIntReal()
163
163
- SCIPconshdlrSetNeedsCons() to set whether constraint handler callbacks should also be called if there are no constraints
164
164
- SCIPpropSetTimingmask() to set timing mask of a propagator
165
+ - added C++ interface for expression handlers: src/objscip/objexprhdlr.h
165
166
166
167
### Changes in preprocessor macros
167
168
Original file line number Diff line number Diff line change @@ -1130,6 +1130,7 @@ OBJSCIPLIBOBJ = objscip/objbenders.o \
1130
1130
objscip/objconshdlr.o \
1131
1131
objscip/objdialog.o \
1132
1132
objscip/objdisp.o \
1133
+ objscip/objexprhdlr.o \
1133
1134
objscip/objeventhdlr.o \
1134
1135
objscip/objheur.o \
1135
1136
objscip/objmessagehdlr.o \
Original file line number Diff line number Diff line change 4244
4244
*
4245
4245
* For a complete implementation of an expression handler, take the one for exponential expressions (src/scip/expr_exp.c) as an example.
4246
4246
*
4247
+ * It is very easy to transfer the C explanation to C++; whenever a function should be implemented using the
4248
+ * SCIP_DECL_EXPRHDLR... notion, reimplement the corresponding virtual member function of the abstract scip::ObjExprhdlr
4249
+ * base class.
4250
+ *
4247
4251
* @section EXPRHDLR_PROPERTIES Properties of an Expression Handler
4248
4252
*
4249
4253
* At the top of the new file `expr_myfunc.c`, you can find the expression handler properties.
4250
4254
* These are given as compiler defines.
4255
+ * In the C++ wrapper class, you have to provide the expression handler properties by calling the constructor
4256
+ * of the abstract base class scip::ObjExprhdlr from within your constructor.
4251
4257
* The properties you have to set have the following meaning:
4252
4258
*
4253
4259
* \par EXPRHDLR_NAME: the name of the expression handler.
4330
4336
* an operational algorithm.
4331
4337
* They are passed to SCIP when the expression handler is created and included in SCIP via SCIPincludeExprhdlr(),
4332
4338
* see @ref EXPRHDLR_INTERFACE.
4339
+ * In the C++ wrapper class scip::ObjExprhdlr, the fundamental callback methods are virtual abstract member functions.
4340
+ * You have to implement them in order to be able to construct an object of your expression handler class.
4333
4341
*
4334
4342
* Expression handlers have one fundamental callback, @ref EXPREVAL, that needs to be implemented.
4335
4343
* However, expression handlers with stateful expressions (expressions that have data) need to implement also the
Original file line number Diff line number Diff line change @@ -427,6 +427,7 @@ set(objscipsources
427
427
objscip/objdialog.cpp
428
428
objscip/objdisp.cpp
429
429
objscip/objeventhdlr.cpp
430
+ objscip/objexprhdlr.cpp
430
431
objscip/objheur.cpp
431
432
objscip/objiisfinder.cpp
432
433
objscip/objmessagehdlr.cpp
@@ -494,6 +495,7 @@ set(objscipheaders
494
495
objscip/objdialog.h
495
496
objscip/objdisp.h
496
497
objscip/objeventhdlr.h
498
+ objscip/objexprhdlr.h
497
499
objscip/objheur.h
498
500
objscip/objiisfinder.h
499
501
objscip/objmessagehdlr.h
You can’t perform that action at this time.
0 commit comments