Scippy

SCIP

Solving Constraint Integer Programs

objexprhdlr.h File Reference

Detailed Description

C++ wrapper for expression handlers.

Author
Kevin Kofler

Definition in file objexprhdlr.h.

#include <cstring>
#include <utility>
#include "scip/scip.h"
#include "objscip/objcloneable.h"

Go to the source code of this file.

Data Structures

class  scip::ObjExprhdlr
 C++ wrapper for expression handlers. More...
 

Namespaces

namespace  scip
 

Functions

SCIP_RETCODE SCIPincludeObjExprhdlr (SCIP *scip, scip::ObjExprhdlr *objexprhdlr, SCIP_Bool deleteobject, SCIP_EXPRHDLR **cexprhdlr=0)
 
scip::ObjExprhdlrSCIPfindObjExprhdlr (SCIP *scip, const char *name)
 
scip::ObjExprhdlrSCIPgetObjExprhdlr (SCIP *scip, SCIP_EXPRHDLR *exprhdlr)
 

Function Documentation

◆ 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

The method should be called in one of the following ways:

  1. The user is responsible of deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_EXPRHDLR* cexprhdlr; MyExprhdlr* myexprhdlr = new MyExprhdlr(...); SCIP_CALL( SCIPincludeObjExprhdlr(scip, &myexprhdlr, FALSE, &cexprhdlr) ); ... SCIP_CALL( SCIPfree(&scip) ); delete myexprhdlr; // delete exprhdlr AFTER SCIPfree() !
  2. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjExprhdlr(scip, new MyExprhdlr(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyExprhdlr is called here

Further, in case 1, the C plugin counterpart for myexprhdlr is stored in 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().