SCIP Doxygen Documentation
Loading...
Searching...
No Matches
objprop.h File Reference

Detailed Description

C++ wrapper for propagators.

Author
Tobias Achterberg

Definition in file objprop.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::ObjProp
 C++ wrapper for propagators. More...

Namespaces

namespace  scip

Functions

SCIP_RETCODE SCIPincludeObjProp (SCIP *scip, scip::ObjProp *objprop, SCIP_Bool deleteobject)
scip::ObjPropSCIPfindObjProp (SCIP *scip, const char *name)
scip::ObjPropSCIPgetObjProp (SCIP *scip, SCIP_PROP *prop)

Function Documentation

◆ SCIPincludeObjProp()

SCIP_RETCODE SCIPincludeObjProp ( SCIP * scip,
scip::ObjProp * objprop,
SCIP_Bool deleteobject )

creates the propagator for the given propagator object and includes it in SCIP

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

  1. The user is resposible of deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MyProp* myprop = new MyProp(...); SCIP_CALL( SCIPincludeObjProp(scip, &myprop, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete myprop; // delete prop AFTER SCIPfree() !
  2. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjProp(scip, new MyProp(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyProp is called here

creates the propagator for the given propagator object and includes it in SCIP

Parameters
scipSCIP data structure
objproppropagator object
deleteobjectshould the propagator object be deleted when propagator is freed?

Definition at line 276 of file objprop.cpp.

References assert(), NULL, SCIP_Bool, SCIP_CALL, scip::ObjProp::scip_delay_, scip::ObjProp::scip_desc_, scip::ObjProp::scip_freq_, scip::ObjProp::scip_name_, SCIP_OKAY, scip::ObjProp::scip_presol_maxrounds_, scip::ObjProp::scip_presol_priority_, scip::ObjProp::scip_presol_timing_, scip::ObjProp::scip_priority_, scip::ObjProp::scip_timingmask_, and SCIPincludeProp().

Referenced by SCIP_DECL_PROPCOPY().

◆ SCIPfindObjProp()

scip::ObjProp * SCIPfindObjProp ( SCIP * scip,
const char * name )

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

Parameters
scipSCIP data structure
namename of propagator

Definition at line 304 of file objprop.cpp.

References assert(), NULL, SCIPfindProp(), and SCIPpropGetData().

◆ SCIPgetObjProp()

scip::ObjProp * SCIPgetObjProp ( SCIP * scip,
SCIP_PROP * prop )

returns the prop object for the given propagator

Parameters
scipSCIP data structure
proppropagator

Definition at line 323 of file objprop.cpp.

References assert(), NULL, and SCIPpropGetData().