SCIP-SDP  3.2.0
Namespaces | Functions
objreader_sdpaind.cpp File Reference

Reader for SDPA-Files with indicator constraints (-var in linear constraint => indicator constraint with var as indicator variable) More...

Go to the source code of this file.

Namespaces

 scip
 

Functions

void drop_space (std::istream &line)
 
void drop_rest_line (std::istream &s)
 
static void dropComments (std::istream *file)
 
static SCIP_RETCODE dropSpaceNewlineError (std::istream &line)
 
static SCIP_RETCODE checkForLineEnd (std::istream &line)
 
static SCIP_RETCODE testDigit (std::istream *file)
 
static SCIP_RETCODE checkIndex (const char *indexname, int value, int lb, int ub)
 
 scip::SCIP_DECL_READERREAD (ObjReaderSDPAind::scip_read)
 

Detailed Description

Reader for SDPA-Files with indicator constraints (-var in linear constraint => indicator constraint with var as indicator variable)

Author
Jakob Schelbert
Sonja Mars
Tristan Gally
Marc Pfetsch

Definition in file objreader_sdpaind.cpp.

Function Documentation

void drop_space ( std::istream &  line)
inline

drop spaces and all brackets that are allowed within the blocks in the sdpa format

Definition at line 64 of file objreader_sdpaind.cpp.

Referenced by scip::SCIP_DECL_READERREAD().

void drop_rest_line ( std::istream &  s)
inline

drops the rest of the line

Definition at line 73 of file objreader_sdpaind.cpp.

Referenced by dropComments(), and scip::SCIP_DECL_READERREAD().

static void dropComments ( std::istream *  file)
static

function for removing comments in between the variable & block definitions

Parameters
filethe file instance that is read

Definition at line 81 of file objreader_sdpaind.cpp.

References drop_rest_line().

Referenced by scip::SCIP_DECL_READERREAD().

static SCIP_RETCODE dropSpaceNewlineError ( std::istream &  line)
static

drop spaces and all brackets that are allowed within the blocks in the sdpa format, throws an error if it reaches a newline

Parameters
linethe file instance that is read

Definition at line 96 of file objreader_sdpaind.cpp.

Referenced by scip::SCIP_DECL_READERREAD().

static SCIP_RETCODE checkForLineEnd ( std::istream &  line)
static

checks that only spaces, newlines or comments follow in the current line

Parameters
linethe file instance that is read

Definition at line 120 of file objreader_sdpaind.cpp.

Referenced by scip::SCIP_DECL_READERREAD().

static SCIP_RETCODE testDigit ( std::istream *  file)
static

function to test whether the next character in the input string is a digit (or a minus), if it isn't SCIP aborts with a corresponding error

Parameters
filethe file instance that is read

Definition at line 146 of file objreader_sdpaind.cpp.

Referenced by scip::SCIP_DECL_READERREAD().

static SCIP_RETCODE checkIndex ( const char *  indexname,
int  value,
int  lb,
int  ub 
)
static

function to check whether the given index is within the given bounds, if not an error message for the given string will be thrown

Parameters
indexnamename of the index that will be used in the error message
valuevalue to check against the upper bound
lblower bound to check against
ubupper bound to check against

Definition at line 161 of file objreader_sdpaind.cpp.

Referenced by scip::SCIP_DECL_READERREAD().