Detailed Description
C++ wrapper for expression handlers.
This class defines the interface for expression handlers implemented in C++. Note that there is a pure virtual function (which has to be implemented): the function scip_eval().
- Instructions for implementing an expression handler
- List of available expression handlers
- Corresponding C interface
Definition at line 53 of file objexprhdlr.h.
C++ wrapper for expression handlers. More...
#include <objexprhdlr.h>
Public Member Functions | |
| ObjExprhdlr (SCIP *scip, const char *name, const char *desc, unsigned int precedence, SCIP_Bool has_copydata, SCIP_Bool has_freedata, SCIP_Bool has_simplify, SCIP_Bool has_compare, SCIP_Bool has_print, SCIP_Bool has_parse, SCIP_Bool has_bwdiff, SCIP_Bool has_fwdiff, SCIP_Bool has_bwfwdiff, SCIP_Bool has_inteval, SCIP_Bool has_estimate, SCIP_Bool has_initestimates, SCIP_Bool has_reverseprop, SCIP_Bool has_hash, SCIP_Bool has_curvature, SCIP_Bool has_monotonicity, SCIP_Bool has_integrality, SCIP_Bool has_getsymdata) | |
| ObjExprhdlr (const ObjExprhdlr &o) | |
| ObjExprhdlr (ObjExprhdlr &&o) | |
| virtual | ~ObjExprhdlr () |
| ObjExprhdlr & | operator= (const ObjExprhdlr &o)=delete |
| ObjExprhdlr & | operator= (ObjExprhdlr &&o)=delete |
| virtual | SCIP_DECL_EXPRFREEHDLR (scip_freehdlr) |
| virtual | SCIP_DECL_EXPREVAL (scip_eval)=0 |
| virtual | SCIP_DECL_EXPRCOPYDATA (scip_copydata) |
| virtual | SCIP_DECL_EXPRFREEDATA (scip_freedata) |
| virtual | SCIP_DECL_EXPRSIMPLIFY (scip_simplify) |
| virtual | SCIP_DECL_EXPRCOMPARE (scip_compare) |
| virtual | SCIP_DECL_EXPRPRINT (scip_print) |
| virtual | SCIP_DECL_EXPRPARSE (scip_parse) |
| virtual | SCIP_DECL_EXPRBWDIFF (scip_bwdiff) |
| virtual | SCIP_DECL_EXPRFWDIFF (scip_fwdiff) |
| virtual | SCIP_DECL_EXPRBWFWDIFF (scip_bwfwdiff) |
| virtual | SCIP_DECL_EXPRINTEVAL (scip_inteval) |
| virtual | SCIP_DECL_EXPRESTIMATE (scip_estimate) |
| virtual | SCIP_DECL_EXPRINITESTIMATES (scip_initestimates) |
| virtual | SCIP_DECL_EXPRREVERSEPROP (scip_reverseprop) |
| virtual | SCIP_DECL_EXPRHASH (scip_hash) |
| virtual | SCIP_DECL_EXPRCURVATURE (scip_curvature) |
| virtual | SCIP_DECL_EXPRMONOTONICITY (scip_monotonicity) |
| virtual | SCIP_DECL_EXPRINTEGRALITY (scip_integrality) |
| virtual | SCIP_DECL_EXPRGETSYMDATA (scip_getsymdata) |
Public Member Functions inherited from scip::ObjCloneable | |
| virtual | ~ObjCloneable () |
| ObjCloneable & | operator= (const ObjCloneable &o)=delete |
| ObjCloneable & | operator= (ObjCloneable &&o)=delete |
| virtual | SCIP_DECL_OBJCLONEABLECLONE (ObjCloneable *clone) |
| virtual | SCIP_DECL_OBJCLONEABLEISCLONEABLE (iscloneable) |
Data Fields | |
| SCIP * | scip_ |
| char * | scip_name_ |
| char * | scip_desc_ |
| const unsigned int | scip_precedence_ |
| const SCIP_Bool | scip_has_copydata_ |
| const SCIP_Bool | scip_has_freedata_ |
| const SCIP_Bool | scip_has_simplify_ |
| const SCIP_Bool | scip_has_compare_ |
| const SCIP_Bool | scip_has_print_ |
| const SCIP_Bool | scip_has_parse_ |
| const SCIP_Bool | scip_has_bwdiff_ |
| const SCIP_Bool | scip_has_fwdiff_ |
| const SCIP_Bool | scip_has_bwfwdiff_ |
| const SCIP_Bool | scip_has_inteval_ |
| const SCIP_Bool | scip_has_estimate_ |
| const SCIP_Bool | scip_has_initestimates_ |
| const SCIP_Bool | scip_has_reverseprop_ |
| const SCIP_Bool | scip_has_hash_ |
| const SCIP_Bool | scip_has_curvature_ |
| const SCIP_Bool | scip_has_monotonicity_ |
| const SCIP_Bool | scip_has_integrality_ |
| const SCIP_Bool | scip_has_getsymdata_ |
Constructor & Destructor Documentation
◆ ObjExprhdlr() [1/3]
|
inline |
default constructor
- Parameters
-
scip SCIP data structure name name of expression handler desc description of expression handler precedence precedence of expression operation has_copydata whether scip_copydata is implemented has_freedata whether scip_freedata is implemented has_simplify whether scip_simplify is implemented has_compare whether scip_compare is implemented has_print whether scip_print is implemented has_parse whether scip_parse is implemented has_bwdiff whether scip_bwdiff is implemented has_fwdiff whether scip_fwdiff is implemented has_bwfwdiff whether scip_bwfwdiff is implemented has_inteval whether scip_inteval is implemented has_estimate whether scip_estimate is implemented has_initestimates whether scip_initestimates is implemented has_reverseprop whether scip_reverseprop is implemented has_hash whether scip_hash is implemented has_curvature whether scip_curvature is implemented has_monotonicity whether scip_monotonicity is implemented has_integrality whether scip_integrality is implemented has_getsymdata whether scip_getsymdata is implemented
Definition at line 125 of file objexprhdlr.h.
References scip_, SCIP_CALL_ABORT, scip_desc_, scip_name_, and SCIPduplicateMemoryArray.
◆ ObjExprhdlr() [2/3]
|
inline |
copy constructor
Definition at line 178 of file objexprhdlr.h.
◆ ObjExprhdlr() [3/3]
|
inline |
move constructor
Definition at line 193 of file objexprhdlr.h.
References scip_desc_, and scip_name_.
◆ ~ObjExprhdlr()
|
inlinevirtual |
destructor
Definition at line 222 of file objexprhdlr.h.
References scip_, scip_desc_, scip_name_, and SCIPfreeMemoryArray.
Member Function Documentation
◆ operator=() [1/2]
|
delete |
assignment of polymorphic classes causes slicing and is therefore disabled.
◆ operator=() [2/2]
|
delete |
assignment of polymorphic classes causes slicing and is therefore disabled.
◆ SCIP_DECL_EXPRFREEHDLR()
|
inlinevirtual |
destructor of expression handler to free user data (called when SCIP is exiting)
- See also
- SCIP_DECL_EXPRFREEHDLR(x) in type_expr.h
Definition at line 240 of file objexprhdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_EXPREVAL()
|
pure virtual |
point evaluation callback of expression handler
- See also
- SCIP_DECL_EXPREVAL(x) in type_expr.h
◆ SCIP_DECL_EXPRCOPYDATA()
|
inlinevirtual |
data copy callback of expression handler
This method MUST be overridden if scip_has_copydata_ is TRUE.
- See also
- SCIP_DECL_EXPRCOPYDATA(x) in type_expr.h
Definition at line 257 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRFREEDATA()
|
inlinevirtual |
data free callback of expression handler
This method MUST be overridden if scip_has_freedata_ is TRUE.
- See also
- SCIP_DECL_EXPRFREEDATA(x) in type_expr.h
Definition at line 269 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRSIMPLIFY()
|
inlinevirtual |
simplify callback of expression handler
This method MUST be overridden if scip_has_simplify_ is TRUE.
- See also
- SCIP_DECL_EXPRSIMPLIFY(x) in type_expr.h
Definition at line 281 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRCOMPARE()
|
inlinevirtual |
compare callback of expression handler
This method MUST be overridden if scip_has_compare_ is TRUE.
- See also
- SCIP_DECL_EXPRCOMPARE(x) in type_expr.h
Definition at line 293 of file objexprhdlr.h.
◆ SCIP_DECL_EXPRPRINT()
|
inlinevirtual |
print callback of expression handler
This method MUST be overridden if scip_has_print_ is TRUE.
- See also
- SCIP_DECL_EXPRPRINT(x) in type_expr.h
Definition at line 305 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRPARSE()
|
inlinevirtual |
parse callback of expression handler
This method MUST be overridden if scip_has_parse_ is TRUE.
- See also
- SCIP_DECL_EXPRPARSE(x) in type_expr.h
Definition at line 317 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRBWDIFF()
|
inlinevirtual |
backward derivative evaluation callback of expression handler
This method MUST be overridden if scip_has_bwdiff_ is TRUE.
- See also
- SCIP_DECL_EXPRBWDIFF(x) in type_expr.h
Definition at line 329 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRFWDIFF()
|
inlinevirtual |
forward derivative evaluation callback of expression handler
This method MUST be overridden if scip_has_fwdiff_ is TRUE.
- See also
- SCIP_DECL_EXPRFWDIFF(x) in type_expr.h
Definition at line 341 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRBWFWDIFF()
|
inlinevirtual |
backward over forward derivative evaluation callback of expression handler
This method MUST be overridden if scip_has_bwfwdiff_ is TRUE.
- See also
- SCIP_DECL_EXPRBWFWDIFF(x) in type_expr.h
Definition at line 353 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRINTEVAL()
|
inlinevirtual |
interval evaluation callback of expression handler
This method MUST be overridden if scip_has_inteval_ is TRUE.
- See also
- SCIP_DECL_EXPRINTEVAL(x) in type_expr.h
Definition at line 365 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRESTIMATE()
|
inlinevirtual |
estimation callback of expression handler
This method MUST be overridden if scip_has_estimate_ is TRUE.
- See also
- SCIP_DECL_EXPRESTIMATE(x) in type_expr.h
Definition at line 377 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRINITESTIMATES()
|
inlinevirtual |
initial estimators callback of expression handler
This method MUST be overridden if scip_has_initestimates_ is TRUE.
- See also
- SCIP_DECL_EXPRINITESTIMATES(x) in type_expr.h
Definition at line 389 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRREVERSEPROP()
|
inlinevirtual |
reverse propagation callback of expression handler
This method MUST be overridden if scip_has_reverseprop_ is TRUE.
- See also
- SCIP_DECL_EXPRREVERSEPROP(x) in type_expr.h
Definition at line 401 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRHASH()
|
inlinevirtual |
hash callback of expression handler
This method MUST be overridden if scip_has_hash_ is TRUE.
- See also
- SCIP_DECL_EXPRHASH(x) in type_expr.h
Definition at line 413 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRCURVATURE()
|
inlinevirtual |
curvature callback of expression handler
This method MUST be overridden if scip_has_curvature_ is TRUE.
- See also
- SCIP_DECL_EXPRCURVATURE(x) in type_expr.h
Definition at line 425 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRMONOTONICITY()
|
inlinevirtual |
monotonicity callback of expression handler
This method MUST be overridden if scip_has_monotonicity_ is TRUE.
- See also
- SCIP_DECL_EXPRMONOTONICITY(x) in type_expr.h
Definition at line 437 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRINTEGRALITY()
|
inlinevirtual |
integrality callback of expression handler
This method MUST be overridden if scip_has_integrality_ is TRUE.
- See also
- SCIP_DECL_EXPRINTEGRALITY(x) in type_expr.h
Definition at line 449 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
◆ SCIP_DECL_EXPRGETSYMDATA()
|
inlinevirtual |
symmetry information callback of expression handler
This method MUST be overridden if scip_has_getsymdata_ is TRUE.
- See also
- SCIP_DECL_EXPRGETSYMDATA(x) in type_expr.h
Definition at line 461 of file objexprhdlr.h.
References SCIP_NOTIMPLEMENTED.
Field Documentation
◆ scip_
| SCIP* scip::ObjExprhdlr::scip_ |
SCIP data structure
Definition at line 59 of file objexprhdlr.h.
Referenced by ObjExprhdlr(), SCIPincludeObjExprhdlr(), and ~ObjExprhdlr().
◆ scip_name_
| char* scip::ObjExprhdlr::scip_name_ |
name of the expression handler
Definition at line 62 of file objexprhdlr.h.
Referenced by ObjExprhdlr(), SCIPincludeObjExprhdlr(), and ~ObjExprhdlr().
◆ scip_desc_
| char* scip::ObjExprhdlr::scip_desc_ |
description of the expression handler
Definition at line 65 of file objexprhdlr.h.
Referenced by ObjExprhdlr(), SCIPincludeObjExprhdlr(), and ~ObjExprhdlr().
◆ scip_precedence_
| const unsigned int scip::ObjExprhdlr::scip_precedence_ |
precedence of expression operation relative to other expression (used for printing)
Definition at line 68 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_copydata_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_copydata_ |
whether scip_copydata is implemented
Definition at line 71 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_freedata_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_freedata_ |
whether scip_freedata is implemented
Definition at line 74 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_simplify_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_simplify_ |
whether scip_simplify is implemented
Definition at line 77 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_compare_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_compare_ |
whether scip_compare is implemented
Definition at line 80 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_print_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_print_ |
whether scip_print is implemented
Definition at line 83 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_parse_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_parse_ |
whether scip_parse is implemented
Definition at line 86 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_bwdiff_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_bwdiff_ |
whether scip_bwdiff is implemented
Definition at line 89 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_fwdiff_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_fwdiff_ |
whether scip_fwdiff is implemented
Definition at line 92 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_bwfwdiff_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_bwfwdiff_ |
whether scip_bwfwdiff is implemented
Definition at line 95 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_inteval_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_inteval_ |
whether scip_inteval is implemented
Definition at line 98 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_estimate_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_estimate_ |
whether scip_estimate is implemented
Definition at line 101 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_initestimates_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_initestimates_ |
whether scip_initestimates is implemented
Definition at line 104 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_reverseprop_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_reverseprop_ |
whether scip_reverseprop is implemented
Definition at line 107 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_hash_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_hash_ |
whether scip_hash is implemented
Definition at line 110 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_curvature_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_curvature_ |
whether scip_curvature is implemented
Definition at line 113 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_monotonicity_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_monotonicity_ |
whether scip_monotonicity is implemented
Definition at line 116 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_integrality_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_integrality_ |
whether scip_integrality is implemented
Definition at line 119 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
◆ scip_has_getsymdata_
| const SCIP_Bool scip::ObjExprhdlr::scip_has_getsymdata_ |
whether scip_getsymdata is implemented
Definition at line 122 of file objexprhdlr.h.
Referenced by SCIPincludeObjExprhdlr().
Public Member Functions inherited from