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

Reader for SDPA-files. 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 (ObjReaderSDPA::scip_read)
 

Detailed Description

Reader for SDPA-files.

Author
Jakob Schelbert
Sonja Mars
Tristan Gally
Marc Pfetsch

Definition in file objreader_sdpa.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 63 of file objreader_sdpa.cpp.

Referenced by scip::SCIP_DECL_READERREAD().

void drop_rest_line ( std::istream &  s)
inline

drops the rest of the line

Definition at line 72 of file objreader_sdpa.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 80 of file objreader_sdpa.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 95 of file objreader_sdpa.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 119 of file objreader_sdpa.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 145 of file objreader_sdpa.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 160 of file objreader_sdpa.cpp.

Referenced by scip::SCIP_DECL_READERREAD().