SCIP-SDP
3.2.0
|
maps SCIP variables to SDP indices (the SCIP variables are given SDP indices in the order in which they were inserted) More...
Go to the source code of this file.
Typedefs | |
typedef struct Sdpvarmapper | SdpVarmapper |
Functions | |
SCIP_EXPORT SCIP_RETCODE | SCIPsdpVarmapperCreate (SCIP *scip, SdpVarmapper **varmapper, int size) |
SCIP_EXPORT SCIP_RETCODE | SCIPsdpVarmapperFree (SCIP *scip, SdpVarmapper **varmapper) |
SCIP_EXPORT SCIP_RETCODE | SCIPsdpVarmapperAddVars (SCIP *scip, SdpVarmapper *varmapper, int nvars, SCIP_VAR **vars) |
SCIP_EXPORT SCIP_RETCODE | SCIPsdpVarmapperInsertVar (SCIP *scip, SdpVarmapper *varmapper, SCIP_VAR *var, int pos) |
SCIP_EXPORT int | SCIPsdpVarmapperGetNVars (SdpVarmapper *varmapper) |
SCIP_EXPORT SCIP_Bool | SCIPsdpVarmapperExistsSCIPvar (SdpVarmapper *varmapper, SCIP_VAR *var) |
SCIP_EXPORT int | SCIPsdpVarmapperGetSdpIndex (SdpVarmapper *varmapper, SCIP_VAR *var) |
SCIP_EXPORT SCIP_VAR * | SCIPsdpVarmapperGetSCIPvar (SdpVarmapper *varmapper, int ind) |
SCIP_EXPORT SCIP_RETCODE | SCIPsdpVarmapperRemoveSdpIndex (SCIP *scip, SdpVarmapper *varmapper, int ind) |
SCIP_EXPORT SCIP_RETCODE | SCIPsdpVarmapperTransform (SCIP *scip, SdpVarmapper *varmapper) |
SCIP_EXPORT SCIP_RETCODE | SCIPsdpVarmapperClone (SCIP *scip, SdpVarmapper *oldmapper, SdpVarmapper *newmapper) |
maps SCIP variables to SDP indices (the SCIP variables are given SDP indices in the order in which they were inserted)
Definition in file SdpVarmapper.h.
typedef struct Sdpvarmapper SdpVarmapper |
Definition at line 48 of file SdpVarmapper.h.
SCIP_EXPORT SCIP_RETCODE SCIPsdpVarmapperCreate | ( | SCIP * | scip, |
SdpVarmapper ** | varmapper, | ||
int | size | ||
) |
creates the SDP varmapper
scip | SCIP data structure |
varmapper | Pointer to the varmapper that should be created |
size | initial size of the sciptosdp-hashmap |
Definition at line 53 of file SdpVarmapper.c.
Referenced by SCIP_DECL_RELAXINITSOL().
SCIP_EXPORT SCIP_RETCODE SCIPsdpVarmapperFree | ( | SCIP * | scip, |
SdpVarmapper ** | varmapper | ||
) |
frees the SDP varmapper
scip | SCIP data structure |
varmapper | Pointer to the varmapper that should be freed |
Definition at line 80 of file SdpVarmapper.c.
Referenced by SCIP_DECL_RELAXEXITSOL().
SCIP_EXPORT SCIP_RETCODE SCIPsdpVarmapperAddVars | ( | SCIP * | scip, |
SdpVarmapper * | varmapper, | ||
int | nvars, | ||
SCIP_VAR ** | vars | ||
) |
adds the given variables (if not already existent) to the end of the varmapper
scip | SCIP data structure |
varmapper | varmapper to add variables to |
nvars | number of variables to add to the varmapper |
vars | SCIP variables to add to the varmapper |
Definition at line 108 of file SdpVarmapper.c.
Referenced by SCIP_DECL_RELAXINITSOL(), and SCIPsdpVarmapperInsertVar().
SCIP_EXPORT SCIP_RETCODE SCIPsdpVarmapperInsertVar | ( | SCIP * | scip, |
SdpVarmapper * | varmapper, | ||
SCIP_VAR * | var, | ||
int | pos | ||
) |
adds the given variable (if not already existent) to the varmapper at the given position
scip | SCIP data structure |
varmapper | varmapper to add variable to |
var | SCIP variable to add to the varmapper |
pos | position where the variable should be added |
Definition at line 162 of file SdpVarmapper.c.
References SCIPsdpVarmapperAddVars().
SCIP_EXPORT int SCIPsdpVarmapperGetNVars | ( | SdpVarmapper * | varmapper | ) |
gets the number of variables
varmapper | varmapper to get number of variables for |
Definition at line 215 of file SdpVarmapper.c.
Referenced by calcRelax(), putSdpDataInInterface(), and SCIPrelaxSdpComputeAnalyticCenters().
SCIP_EXPORT SCIP_Bool SCIPsdpVarmapperExistsSCIPvar | ( | SdpVarmapper * | varmapper, |
SCIP_VAR * | var | ||
) |
Is the given SCIP variable included in the varmapper?
varmapper | varmapper to search in |
var | SCIP variable to search for |
Definition at line 225 of file SdpVarmapper.c.
SCIP_EXPORT int SCIPsdpVarmapperGetSdpIndex | ( | SdpVarmapper * | varmapper, |
SCIP_VAR * | var | ||
) |
gets the SDP-index for the given SCIP variable
varmapper | varmapper to get variable index for |
var | SCIP variable to get SDP-index for |
Definition at line 237 of file SdpVarmapper.c.
Referenced by calcRelax(), putLpDataInInterface(), and putSdpDataInInterface().
SCIP_EXPORT SCIP_VAR* SCIPsdpVarmapperGetSCIPvar | ( | SdpVarmapper * | varmapper, |
int | ind | ||
) |
gets the corresponding SCIP variable for the given SDP variable-index
varmapper | varmapper to extract variable from |
ind | index of the SDP-variable |
Definition at line 253 of file SdpVarmapper.c.
Referenced by calcRelax().
SCIP_EXPORT SCIP_RETCODE SCIPsdpVarmapperRemoveSdpIndex | ( | SCIP * | scip, |
SdpVarmapper * | varmapper, | ||
int | ind | ||
) |
removes the variable for the given SDP-index from the varmapper, decreasing the indices of all later variables by 1
scip | SCIP data structure |
varmapper | varmapper to remove variable from |
ind | index of the SDP-variable |
Definition at line 265 of file SdpVarmapper.c.
SCIP_EXPORT SCIP_RETCODE SCIPsdpVarmapperTransform | ( | SCIP * | scip, |
SdpVarmapper * | varmapper | ||
) |
swaps all SCIP variables for their transformed counterparts
scip | SCIP data structure |
varmapper | pointer to the varmapper that should be transformed |
Definition at line 305 of file SdpVarmapper.c.
SCIP_EXPORT SCIP_RETCODE SCIPsdpVarmapperClone | ( | SCIP * | scip, |
SdpVarmapper * | oldmapper, | ||
SdpVarmapper * | newmapper | ||
) |
clones the varmapper in the second argument to the varmapper in the third argument
scip | SCIP data structure |
oldmapper | pointer to the varmapper that should be cloned |
newmapper | pointer to the varmapper that should become a clone of the other one |
Definition at line 336 of file SdpVarmapper.c.