Detailed Description
file reader and writer for vertex coloring solutions
This file implements the reader and writer for coloring solution files.
These files have the following structure:
The first line contains the name of the problem, the number of colors used in the solution, and - optional - the name of the algorithm that computed this solution. The second line lists the colors of the nodes, separated by spaces. It is sorted increasingly by the node indices. The numbers for the colors start with 0.
Definition in file reader_csol.c.
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include "reader_csol.h"
#include "reader_col.h"
#include "probdata_coloring.h"
Go to the source code of this file.
Macros | |
#define | READER_NAME "csolreader" |
#define | READER_DESC "file reader which reads and writes csol-files" |
#define | READER_EXTENSION "csol" |
#define | COL_MAX_LINELEN 65535 |
Functions | |
static long | getNextNumber (char **s) |
static | SCIP_DECL_READERCOPY (readerCopyCsol) |
static | SCIP_DECL_READERREAD (readerReadCsol) |
static | SCIP_DECL_READERWRITE (readerWriteCsol) |
SCIP_RETCODE | SCIPincludeReaderCsol (SCIP *scip) |
Macro Definition Documentation
◆ READER_NAME
#define READER_NAME "csolreader" |
Definition at line 49 of file reader_csol.c.
Referenced by SCIP_DECL_READERCOPY(), SCIP_DECL_READERREAD(), and SCIPincludeReaderCsol().
◆ READER_DESC
#define READER_DESC "file reader which reads and writes csol-files" |
Definition at line 50 of file reader_csol.c.
Referenced by SCIPincludeReaderCsol().
◆ READER_EXTENSION
#define READER_EXTENSION "csol" |
Definition at line 51 of file reader_csol.c.
Referenced by SCIPincludeReaderCsol().
◆ COL_MAX_LINELEN
#define COL_MAX_LINELEN 65535 |
Definition at line 53 of file reader_csol.c.
Referenced by SCIP_DECL_READERREAD().
Function Documentation
◆ getNextNumber()
|
static |
get next number from string s
- Parameters
-
s pointer to the pointer of the current position in the string
Definition at line 63 of file reader_csol.c.
Referenced by SCIP_DECL_READERREAD().
◆ SCIP_DECL_READERCOPY()
|
static |
copy method for reader plugins (called when SCIP copies plugins)
Definition at line 84 of file reader_csol.c.
References NULL, READER_NAME, SCIP_OKAY, and SCIPreaderGetName().
◆ SCIP_DECL_READERREAD()
|
static |
problem reading method of reader
Definition at line 95 of file reader_csol.c.
References COL_MAX_LINELEN, COLORprobAddNewStableSet(), COLORprobAddVarForStableSet(), COLORprobGetConstraints(), COLORprobGetGraph(), COLORprobGetNewNodeForOriginalNode(), COLORprobGetNNodes(), COLORprobGetOriginalNNodes(), FALSE, getNextNumber(), NULL, READER_NAME, SCIP_Bool, SCIP_CALL, SCIP_NOFILE, SCIP_OKAY, SCIP_READERROR, SCIP_STAGE_INIT, SCIP_SUCCESS, SCIP_VARTYPE_BINARY, SCIPaddCoefSetppc(), SCIPaddVar(), SCIPallocBufferArray, SCIPchgVarUbLazy(), SCIPcreateVar(), SCIPerrorMessage, SCIPfgets(), SCIPfopen(), SCIPfreeBufferArray, SCIPgetProbName(), SCIPgetStage(), SCIPreaderGetName(), SCIPsortDownInt(), and TRUE.
◆ SCIP_DECL_READERWRITE()
|
static |
problem writing method of reader
Definition at line 321 of file reader_csol.c.
References COLORprobGetDeletedNodes(), COLORprobGetOriginalGraph(), COLORprobGetOriginalNNodes(), COLORprobGetOriginalNodesForNewNodes(), COLORprobGetStableSets(), COLORprobGetVarForStableSet(), FALSE, nnodes, NULL, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_SUCCESS, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPgetBestSol(), SCIPgetSolVal(), SCIPinfoMessage(), tcliqueGetFirstAdjedge(), tcliqueGetLastAdjedge(), and TRUE.
◆ SCIPincludeReaderCsol()
SCIP_RETCODE SCIPincludeReaderCsol | ( | SCIP * | scip | ) |
includes the csol file reader in SCIP
- Parameters
-
scip SCIP data structure
Definition at line 437 of file reader_csol.c.
References NULL, READER_DESC, READER_EXTENSION, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludeReaderBasic(), SCIPsetReaderCopy(), SCIPsetReaderRead(), and SCIPsetReaderWrite().
Referenced by SCIPincludeColoringPlugins().