Detailed Description
C++ wrapper for variable pricers.
Definition in file objpricer.h.
Go to the source code of this file.
Data Structures | |
class | scip::ObjPricer |
C++ wrapper for variable pricer. More... | |
Namespaces | |
scip | |
Functions | |
SCIP_RETCODE | SCIPincludeObjPricer (SCIP *scip, scip::ObjPricer *objpricer, SCIP_Bool deleteobject) |
scip::ObjPricer * | SCIPfindObjPricer (SCIP *scip, const char *name) |
scip::ObjPricer * | SCIPgetObjPricer (SCIP *scip, SCIP_PRICER *pricer) |
Function Documentation
◆ SCIPincludeObjPricer()
SCIP_RETCODE SCIPincludeObjPricer | ( | SCIP * | scip, |
scip::ObjPricer * | objpricer, | ||
SCIP_Bool | deleteobject | ||
) |
creates the variable pricer for the given variable pricer 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) ); ... MyPricer* mypricer = new MyPricer(...); SCIP_CALL( SCIPincludeObjPricer(scip, &mypricer, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mypricer; // delete pricer AFTER SCIPfree() !
- The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjPricer(scip, new MyPricer(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyPricer is called here
creates the variable pricer for the given variable pricer object and includes it in SCIP
- Parameters
-
scip SCIP data structure objpricer variable pricer object deleteobject should the pricer object be deleted when pricer is freed?
Definition at line 212 of file objpricer.cpp.
References NULL, SCIP_CALL, scip::ObjPricer::scip_delay_, scip::ObjPricer::scip_desc_, scip::ObjPricer::scip_name_, SCIP_OKAY, scip::ObjPricer::scip_priority_, and SCIPincludePricer().
Referenced by execmain(), SCIP_DECL_PRICERCOPY(), and scip::ObjPricer::SCIP_DECL_PRICERFARKAS().
◆ SCIPfindObjPricer()
scip::ObjPricer* SCIPfindObjPricer | ( | SCIP * | scip, |
const char * | name | ||
) |
returns the variable pricer object of the given name, or 0 if not existing
- Parameters
-
scip SCIP data structure name name of variable pricer
Definition at line 240 of file objpricer.cpp.
References NULL, SCIPfindPricer(), and SCIPpricerGetData().
Referenced by scip::ObjPricer::SCIP_DECL_PRICERFARKAS().
◆ SCIPgetObjPricer()
scip::ObjPricer* SCIPgetObjPricer | ( | SCIP * | scip, |
SCIP_PRICER * | pricer | ||
) |
returns the variable pricer object for the given pricer
- Parameters
-
scip SCIP data structure pricer pricer
Definition at line 259 of file objpricer.cpp.
References NULL, and SCIPpricerGetData().
Referenced by scip::ObjPricer::SCIP_DECL_PRICERFARKAS().