C++ wrapper for user variable data.
Definition in file objvardata.h.
Go to the source code of this file.
Data Structures | |
class | scip::ObjVardata |
C++ wrapper for user variable data. More... |
Namespaces | |
namespace | scip |
Functions | |
SCIP_RETCODE | SCIPcreateObjVar (SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, scip::ObjVardata *objvardata, SCIP_Bool deleteobject) |
scip::ObjVardata * | SCIPgetObjVardata (SCIP *scip, SCIP_VAR *var) |
SCIP_RETCODE SCIPcreateObjVar | ( | SCIP * | scip, |
SCIP_VAR ** | var, | ||
const char * | name, | ||
SCIP_Real | lb, | ||
SCIP_Real | ub, | ||
SCIP_Real | obj, | ||
SCIP_VARTYPE | vartype, | ||
SCIP_Bool | initial, | ||
SCIP_Bool | removable, | ||
scip::ObjVardata * | objvardata, | ||
SCIP_Bool | deleteobject ) |
create and capture problem variable and associates the given variable data with the variable; if variable is of integral type, fractional bounds are automatically rounded
scip | SCIP data structure |
var | pointer to variable object |
name | name of variable, or NULL for automatic name creation |
lb | lower bound of variable |
ub | upper bound of variable |
obj | objective function value |
vartype | type of variable |
initial | should var's column be present in the initial root LP? |
removable | is var's column removable from the LP (due to aging or cleanup)? |
objvardata | user variable data object |
deleteobject | should the user variable data object be deleted when variable is freed? |
Definition at line 175 of file objvardata.cpp.
References obj, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPcreateVar(), and var.
scip::ObjVardata * SCIPgetObjVardata | ( | SCIP * | scip, |
SCIP_VAR * | var ) |
gets user variable data object for given problem variable Warning! This method should only be called after a variable was created with SCIPcreateObjVar(). Otherwise, a segmentation fault may arise, or an undefined pointer is returned.
scip | SCIP data structure |
var | problem variable |
Definition at line 207 of file objvardata.cpp.
References assert(), NULL, SCIPvarGetData(), and var.