Detailed Description
C++ wrapper for constraint handlers.
Definition in file objconshdlr.h.
#include <cassert>
#include <cstring>
#include <utility>
#include "scip/scip.h"
#include "objscip/objprobcloneable.h"
Go to the source code of this file.
Data Structures | |
class | scip::ObjConshdlr |
C++ wrapper for constraint handlers. More... | |
Namespaces | |
namespace | scip |
Functions | |
SCIP_RETCODE | SCIPincludeObjConshdlr (SCIP *scip, scip::ObjConshdlr *objconshdlr, SCIP_Bool deleteobject) |
scip::ObjConshdlr * | SCIPfindObjConshdlr (SCIP *scip, const char *name) |
scip::ObjConshdlr * | SCIPgetObjConshdlr (SCIP *scip, SCIP_CONSHDLR *conshdlr) |
Function Documentation
◆ SCIPincludeObjConshdlr()
SCIP_RETCODE SCIPincludeObjConshdlr | ( | SCIP * | scip, |
scip::ObjConshdlr * | objconshdlr, | ||
SCIP_Bool | deleteobject | ||
) |
creates the constraint handler for the given constraint handler object and includes it in SCIP
The method should be called in one of the following ways:
- The user is resposible of deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MyConshdlr* myconshdlr = new MyConshdlr(...); SCIP_CALL( SCIPincludeObjConshdlr(scip, &myconshdlr, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete myconshdlr; // delete conshdlr AFTER SCIPfree() !
- The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjConshdlr(scip, new MyConshdlr(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyConshdlr is called here
creates the constraint handler for the given constraint handler object and includes it in SCIP
- Parameters
-
scip SCIP data structure objconshdlr constraint handler object deleteobject should the constraint handler object be deleted when conshdlr is freed?
Definition at line 662 of file objconshdlr.cpp.
References NULL, scip::ObjConshdlr::scip_, SCIP_CALL, scip::ObjConshdlr::scip_checkpriority_, scip::ObjConshdlr::scip_delayprop_, scip::ObjConshdlr::scip_delaysepa_, scip::ObjConshdlr::scip_desc_, scip::ObjConshdlr::scip_eagerfreq_, scip::ObjConshdlr::scip_enfopriority_, scip::ObjConshdlr::scip_maxprerounds_, scip::ObjConshdlr::scip_name_, scip::ObjConshdlr::scip_needscons_, SCIP_OKAY, scip::ObjConshdlr::scip_presoltiming_, scip::ObjConshdlr::scip_propfreq_, scip::ObjConshdlr::scip_proptiming_, scip::ObjConshdlr::scip_sepafreq_, scip::ObjConshdlr::scip_sepapriority_, and SCIPincludeConshdlr().
Referenced by runSCIP(), and SCIP_DECL_CONSHDLRCOPY().
◆ SCIPfindObjConshdlr()
scip::ObjConshdlr * SCIPfindObjConshdlr | ( | SCIP * | scip, |
const char * | name | ||
) |
returns the conshdlr object of the given name, or 0 if not existing
- Parameters
-
scip SCIP data structure name name of constraint handler
Definition at line 702 of file objconshdlr.cpp.
References NULL, SCIPconshdlrGetData(), and SCIPfindConshdlr().
◆ SCIPgetObjConshdlr()
scip::ObjConshdlr * SCIPgetObjConshdlr | ( | SCIP * | scip, |
SCIP_CONSHDLR * | conshdlr | ||
) |
returns the conshdlr object for the given constraint handler
- Parameters
-
scip SCIP data structure conshdlr constraint handler
Definition at line 721 of file objconshdlr.cpp.
References NULL, and SCIPconshdlrGetData().