Detailed Description
C++ wrapper for presolvers.
Definition in file objpresol.h.
Go to the source code of this file.
Data Structures | |
class | scip::ObjPresol |
C++ wrapper for presolvers. More... | |
Namespaces | |
scip | |
Functions | |
SCIP_RETCODE | SCIPincludeObjPresol (SCIP *scip, scip::ObjPresol *objpresol, SCIP_Bool deleteobject) |
scip::ObjPresol * | SCIPfindObjPresol (SCIP *scip, const char *name) |
scip::ObjPresol * | SCIPgetObjPresol (SCIP *scip, SCIP_PRESOL *presol) |
Function Documentation
◆ SCIPincludeObjPresol()
SCIP_RETCODE SCIPincludeObjPresol | ( | SCIP * | scip, |
scip::ObjPresol * | objpresol, | ||
SCIP_Bool | deleteobject | ||
) |
creates the presolver for the given presolver 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) ); ... MyPresol* mypresol = new MyPresol(...); SCIP_CALL( SCIPincludeObjPresol(scip, &mypresol, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mypresol; // delete presol AFTER SCIPfree() !
- The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjPresol(scip, new MyPresol(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyPresol is called here
creates the presolver for the given presolver object and includes it in SCIP
- Parameters
-
scip SCIP data structure objpresol presolver object deleteobject should the presolver object be deleted when presolver is freed?
Definition at line 208 of file objpresol.cpp.
References NULL, SCIP_CALL, scip::ObjPresol::scip_desc_, scip::ObjPresol::scip_maxrounds_, scip::ObjPresol::scip_name_, SCIP_OKAY, scip::ObjPresol::scip_priority_, scip::ObjPresol::scip_timing_, and SCIPincludePresol().
Referenced by SCIP_DECL_PRESOLCOPY(), and scip::ObjPresol::SCIP_DECL_PRESOLEXITPRE().
◆ SCIPfindObjPresol()
scip::ObjPresol* SCIPfindObjPresol | ( | SCIP * | scip, |
const char * | name | ||
) |
returns the presol object of the given name, or 0 if not existing
- Parameters
-
scip SCIP data structure name name of presolver
Definition at line 235 of file objpresol.cpp.
References NULL, SCIPfindPresol(), and SCIPpresolGetData().
Referenced by scip::ObjPresol::SCIP_DECL_PRESOLEXITPRE().
◆ SCIPgetObjPresol()
scip::ObjPresol* SCIPgetObjPresol | ( | SCIP * | scip, |
SCIP_PRESOL * | presol | ||
) |
returns the presol object for the given presolver
- Parameters
-
scip SCIP data structure presol presolver
Definition at line 254 of file objpresol.cpp.
References NULL, and SCIPpresolGetData().
Referenced by scip::ObjPresol::SCIP_DECL_PRESOLEXITPRE().