Scippy

SCIP

Solving Constraint Integer Programs

objexprhdlr.cpp File Reference

Detailed Description

C++ wrapper for expression handlers.

Author
Kevin Kofler

Definition in file objexprhdlr.cpp.

#include <cassert>
#include "objexprhdlr.h"

Go to the source code of this file.

Functions

static SCIP_DECL_EXPRCOPYHDLR (exprCopyhdlrObj)
 
static SCIP_DECL_EXPRFREEHDLR (exprFreehdlrObj)
 
static SCIP_DECL_EXPREVAL (exprEvalObj)
 
static SCIP_DECL_EXPRCOPYDATA (exprCopydataObj)
 
static SCIP_DECL_EXPRFREEDATA (exprFreedataObj)
 
static SCIP_DECL_EXPRSIMPLIFY (exprSimplifyObj)
 
static SCIP_DECL_EXPRCOMPARE (exprCompareObj)
 
static SCIP_DECL_EXPRPRINT (exprPrintObj)
 
static SCIP_DECL_EXPRPARSE (exprParseObj)
 
static SCIP_DECL_EXPRBWDIFF (exprBwdiffObj)
 
static SCIP_DECL_EXPRFWDIFF (exprFwdiffObj)
 
static SCIP_DECL_EXPRBWFWDIFF (exprBwfwdiffObj)
 
static SCIP_DECL_EXPRINTEVAL (exprIntevalObj)
 
static SCIP_DECL_EXPRESTIMATE (exprEstimateObj)
 
static SCIP_DECL_EXPRINITESTIMATES (exprInitestimatesObj)
 
static SCIP_DECL_EXPRREVERSEPROP (exprReversepropObj)
 
static SCIP_DECL_EXPRHASH (exprHashObj)
 
static SCIP_DECL_EXPRCURVATURE (exprCurvatureObj)
 
static SCIP_DECL_EXPRMONOTONICITY (exprMonotonicityObj)
 
static SCIP_DECL_EXPRINTEGRALITY (exprIntegralityObj)
 
static SCIP_DECL_EXPRGETSYMDATA (exprGetsymdataObj)
 
SCIP_RETCODE SCIPincludeObjExprhdlr (SCIP *scip, scip::ObjExprhdlr *objexprhdlr, SCIP_Bool deleteobject, SCIP_EXPRHDLR **cexprhdlr)
 
scip::ObjExprhdlrSCIPfindObjExprhdlr (SCIP *scip, const char *name)
 
scip::ObjExprhdlrSCIPgetObjExprhdlr (SCIP *scip, SCIP_EXPRHDLR *exprhdlr)
 

Function Documentation

◆ SCIP_DECL_EXPRCOPYHDLR()

static SCIP_DECL_EXPRCOPYHDLR ( exprCopyhdlrObj  )
static

copy method for expression handler plugins (called when SCIP copies plugins)

Definition at line 62 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprhdlrGetData(), SCIPincludeObjExprhdlr(), and TRUE.

◆ SCIP_DECL_EXPRFREEHDLR()

static SCIP_DECL_EXPRFREEHDLR ( exprFreehdlrObj  )
static

destructor of expression handler to free user data (called when SCIP is exiting)

Definition at line 87 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, and SCIP_OKAY.

◆ SCIP_DECL_EXPREVAL()

static SCIP_DECL_EXPREVAL ( exprEvalObj  )
static

point evaluation callback of expression handler

Definition at line 111 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRCOPYDATA()

static SCIP_DECL_EXPRCOPYDATA ( exprCopydataObj  )
static

data copy callback of expression handler

Definition at line 127 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRFREEDATA()

static SCIP_DECL_EXPRFREEDATA ( exprFreedataObj  )
static

data free callback of expression handler

Definition at line 142 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRSIMPLIFY()

static SCIP_DECL_EXPRSIMPLIFY ( exprSimplifyObj  )
static

simplify callback of expression handler

Definition at line 158 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRCOMPARE()

static SCIP_DECL_EXPRCOMPARE ( exprCompareObj  )
static

compare callback of expression handler

Definition at line 174 of file objexprhdlr.cpp.

References NULL, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRPRINT()

static SCIP_DECL_EXPRPRINT ( exprPrintObj  )
static

print callback of expression handler

Definition at line 188 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRPARSE()

static SCIP_DECL_EXPRPARSE ( exprParseObj  )
static

parse callback of expression handler

Definition at line 204 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRBWDIFF()

static SCIP_DECL_EXPRBWDIFF ( exprBwdiffObj  )
static

backward derivative evaluation callback of expression handler

Definition at line 220 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRFWDIFF()

static SCIP_DECL_EXPRFWDIFF ( exprFwdiffObj  )
static

forward derivative evaluation callback of expression handler

Definition at line 236 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRBWFWDIFF()

static SCIP_DECL_EXPRBWFWDIFF ( exprBwfwdiffObj  )
static

backward over forward derivative evaluation callback of expression handler

Definition at line 252 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRINTEVAL()

static SCIP_DECL_EXPRINTEVAL ( exprIntevalObj  )
static

interval evaluation callback of expression handler

Definition at line 268 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRESTIMATE()

static SCIP_DECL_EXPRESTIMATE ( exprEstimateObj  )
static

estimation callback of expression handler

Definition at line 284 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRINITESTIMATES()

static SCIP_DECL_EXPRINITESTIMATES ( exprInitestimatesObj  )
static

initial estimators callback of expression handler

Definition at line 301 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRREVERSEPROP()

static SCIP_DECL_EXPRREVERSEPROP ( exprReversepropObj  )
static

reverse propagation callback of expression handler

Definition at line 318 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRHASH()

static SCIP_DECL_EXPRHASH ( exprHashObj  )
static

hash callback of expression handler

Definition at line 334 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRCURVATURE()

static SCIP_DECL_EXPRCURVATURE ( exprCurvatureObj  )
static

curvature callback of expression handler

Definition at line 350 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRMONOTONICITY()

static SCIP_DECL_EXPRMONOTONICITY ( exprMonotonicityObj  )
static

monotonicity callback of expression handler

Definition at line 366 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRINTEGRALITY()

static SCIP_DECL_EXPRINTEGRALITY ( exprIntegralityObj  )
static

integrality callback of expression handler

Definition at line 382 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIP_DECL_EXPRGETSYMDATA()

static SCIP_DECL_EXPRGETSYMDATA ( exprGetsymdataObj  )
static

symmetry information callback of expression handler

Definition at line 398 of file objexprhdlr.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPexprGetHdlr(), and SCIPexprhdlrGetData().

◆ SCIPincludeObjExprhdlr()

SCIP_RETCODE SCIPincludeObjExprhdlr ( SCIP scip,
scip::ObjExprhdlr objexprhdlr,
SCIP_Bool  deleteobject,
SCIP_EXPRHDLR **  cexprhdlr 
)

creates the expression handler for the given expression handler object and includes it in SCIP

Parameters
scipSCIP data structure
objexprhdlrexpression handler object
deleteobjectshould the expression handler object be deleted when exprhdlr is freed?
cexprhdlrbuffer to store C plugin that corresponds to expression handler object, or 0 if not required

Definition at line 418 of file objexprhdlr.cpp.

References NULL, scip::ObjExprhdlr::scip_, SCIP_CALL, scip::ObjExprhdlr::scip_desc_, scip::ObjExprhdlr::scip_has_bwdiff_, scip::ObjExprhdlr::scip_has_bwfwdiff_, scip::ObjExprhdlr::scip_has_compare_, scip::ObjExprhdlr::scip_has_copydata_, scip::ObjExprhdlr::scip_has_curvature_, scip::ObjExprhdlr::scip_has_estimate_, scip::ObjExprhdlr::scip_has_freedata_, scip::ObjExprhdlr::scip_has_fwdiff_, scip::ObjExprhdlr::scip_has_getsymdata_, scip::ObjExprhdlr::scip_has_hash_, scip::ObjExprhdlr::scip_has_initestimates_, scip::ObjExprhdlr::scip_has_integrality_, scip::ObjExprhdlr::scip_has_inteval_, scip::ObjExprhdlr::scip_has_monotonicity_, scip::ObjExprhdlr::scip_has_parse_, scip::ObjExprhdlr::scip_has_print_, scip::ObjExprhdlr::scip_has_reverseprop_, scip::ObjExprhdlr::scip_has_simplify_, scip::ObjExprhdlr::scip_name_, SCIP_OKAY, scip::ObjExprhdlr::scip_precedence_, SCIPexprhdlrSetCompare(), SCIPexprhdlrSetCopyFreeData(), SCIPexprhdlrSetCopyFreeHdlr(), SCIPexprhdlrSetCurvature(), SCIPexprhdlrSetDiff(), SCIPexprhdlrSetEstimate(), SCIPexprhdlrSetGetSymdata(), SCIPexprhdlrSetHash(), SCIPexprhdlrSetIntegrality(), SCIPexprhdlrSetIntEval(), SCIPexprhdlrSetMonotonicity(), SCIPexprhdlrSetParse(), SCIPexprhdlrSetPrint(), SCIPexprhdlrSetReverseProp(), SCIPexprhdlrSetSimplify(), and SCIPincludeExprhdlr().

Referenced by SCIP_DECL_EXPRCOPYHDLR().

◆ SCIPfindObjExprhdlr()

scip::ObjExprhdlr * SCIPfindObjExprhdlr ( SCIP scip,
const char *  name 
)

returns the exprhdlr object of the given name, or 0 if not existing

Parameters
scipSCIP data structure
namename of expression handler

Definition at line 485 of file objexprhdlr.cpp.

References NULL, SCIPexprhdlrGetData(), and SCIPfindExprhdlr().

◆ SCIPgetObjExprhdlr()

scip::ObjExprhdlr * SCIPgetObjExprhdlr ( SCIP scip,
SCIP_EXPRHDLR exprhdlr 
)

returns the exprhdlr object for the given expression handler

Parameters
scipSCIP data structure
exprhdlrexpression handler

Definition at line 504 of file objexprhdlr.cpp.

References NULL, and SCIPexprhdlrGetData().