SCIP-SDP  2.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Typedefs | Functions
SdpVarmapper.h File Reference

class that 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

EXTERN SCIP_RETCODE SCIPsdpVarmapperCreate (SCIP *scip, SdpVarmapper **varmapper, int size)
 
EXTERN SCIP_RETCODE SCIPsdpVarmapperFree (SCIP *scip, SdpVarmapper **varmapper)
 
EXTERN SCIP_RETCODE SCIPsdpVarmapperAddVars (SCIP *scip, SdpVarmapper *varmapper, int nvars, SCIP_VAR **vars)
 
EXTERN SCIP_RETCODE SCIPsdpVarmapperInsertVar (SCIP *scip, SdpVarmapper *varmapper, SCIP_VAR *var, int pos)
 
EXTERN int SCIPsdpVarmapperGetNVars (SdpVarmapper *varmapper)
 
EXTERN SCIP_Bool SCIPsdpVarmapperExistsSCIPvar (SdpVarmapper *varmapper, SCIP_VAR *var)
 
EXTERN int SCIPsdpVarmapperGetSdpIndex (SdpVarmapper *varmapper, SCIP_VAR *var)
 
EXTERN SCIP_VAR * SCIPsdpVarmapperGetSCIPvar (SdpVarmapper *varmapper, int ind)
 
EXTERN SCIP_RETCODE SCIPsdpVarmapperRemoveSdpIndex (SCIP *scip, SdpVarmapper *varmapper, int ind)
 
EXTERN SCIP_RETCODE SCIPsdpVarmapperTransform (SCIP *scip, SdpVarmapper *varmapper)
 
EXTERN SCIP_RETCODE SCIPsdpVarmapperClone (SCIP *scip, SdpVarmapper *oldmapper, SdpVarmapper *newmapper)
 

Detailed Description

class that maps SCIP variables to SDP indices (the SCIP variables are given SDP indices in the order in which they were inserted)

Author
Tristan Gally

Definition in file SdpVarmapper.h.

Typedef Documentation

typedef struct Sdpvarmapper SdpVarmapper

Definition at line 48 of file SdpVarmapper.h.

Function Documentation

EXTERN SCIP_RETCODE SCIPsdpVarmapperCreate ( SCIP *  scip,
SdpVarmapper **  varmapper,
int  size 
)

creates the SDP varmapper

Parameters
scipSCIP data structure
varmapperPointer to the varmapper that should be created
sizeinitial size of the sciptosdp-hashmap

Definition at line 58 of file SdpVarmapper.c.

Referenced by SCIP_DECL_RELAXINITSOL().

EXTERN SCIP_RETCODE SCIPsdpVarmapperFree ( SCIP *  scip,
SdpVarmapper **  varmapper 
)

frees the SDP varmapper

Parameters
scipSCIP data structure
varmapperPointer to the varmapper that should be freed

Definition at line 85 of file SdpVarmapper.c.

Referenced by SCIP_DECL_RELAXEXIT().

EXTERN 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

Parameters
scipSCIP data structure
varmappervarmapper to add variables to
nvarsnumber of variables to add to the varmapper
varsSCIP variables to add to the varmapper

Definition at line 113 of file SdpVarmapper.c.

Referenced by SCIP_DECL_RELAXINITSOL(), and SCIPsdpVarmapperInsertVar().

EXTERN 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

Parameters
scipSCIP data structure
varmappervarmapper to add variable to
varSCIP variable to add to the varmapper
posposition where the variable should be added

Definition at line 163 of file SdpVarmapper.c.

References SCIPsdpVarmapperAddVars().

EXTERN int SCIPsdpVarmapperGetNVars ( SdpVarmapper varmapper)

gets the number of variables

Parameters
varmappervarmapper to get number of variables for

Definition at line 208 of file SdpVarmapper.c.

EXTERN SCIP_Bool SCIPsdpVarmapperExistsSCIPvar ( SdpVarmapper varmapper,
SCIP_VAR *  var 
)

Is the given SCIP variable included in the varmapper?

Parameters
varmappervarmapper to search in
varSCIP variable to search for

Definition at line 218 of file SdpVarmapper.c.

EXTERN int SCIPsdpVarmapperGetSdpIndex ( SdpVarmapper varmapper,
SCIP_VAR *  var 
)

gets the SDP-index for the given SCIP variable

Parameters
varmappervarmapper to get variable index for
varSCIP variable to get SDP-index for

Definition at line 230 of file SdpVarmapper.c.

Referenced by putLpDataInInterface(), and putSdpDataInInterface().

EXTERN SCIP_VAR* SCIPsdpVarmapperGetSCIPvar ( SdpVarmapper varmapper,
int  ind 
)

gets the corresponding SCIP variable for the given SDP variable-index

Parameters
varmappervarmapper to extract variable from
indindex of the SDP-variable

Definition at line 242 of file SdpVarmapper.c.

Referenced by calcRelax().

EXTERN 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

Parameters
scipSCIP data structure
varmappervarmapper to remove variable from
indindex of the SDP-variable

Definition at line 254 of file SdpVarmapper.c.

EXTERN SCIP_RETCODE SCIPsdpVarmapperTransform ( SCIP *  scip,
SdpVarmapper varmapper 
)

swaps all SCIP variables for their transformed counterparts

Parameters
scipSCIP data structure
varmapperpointer to the varmapper that should be transformed

Definition at line 290 of file SdpVarmapper.c.

EXTERN SCIP_RETCODE SCIPsdpVarmapperClone ( SCIP *  scip,
SdpVarmapper oldmapper,
SdpVarmapper newmapper 
)

clones the varmapper in the second argument to the varmapper in the third argument

Parameters
scipSCIP data structure
oldmapperpointer to the varmapper that should be cloned
newmapperpointer to the varmapper that should become a clone of the other one

Definition at line 318 of file SdpVarmapper.c.